This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Action: | |
MOVE = 0 | |
ATTACK = 1 | |
HOLD_POSITION = 2 | |
def get_attacked(thing) | |
thing.get_attacked() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = Player("Dan") | |
p.deposit(10) | |
amount = 3 | |
bet = p.wager(amount) # Returns None if you dont have enough monies | |
if bet is not None: | |
h = HighOrLow([p]) | |
bet.set_type(HighOrLowBetType(HighOrLowBetType.High)) | |
h.add_bet(bet) | |
h.start_round() | |
print("Cash on hand: {} gold".format(p.bank)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Constant: | |
def __init__(self, value): | |
self.value = value | |
def __call__(self, *args, **kwargs): | |
return self.value | |
class Function: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
class GameController: | |
def __init__(self, width, height): | |
pygame.init() | |
self.width = width | |
self.height = height | |
self.running = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
class GameController: | |
def __init__(self, width, height): | |
pygame.init() | |
self.width = width | |
self.height = height | |
self.running = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
WIDTH = 1024 | |
HEIGHT = 768 | |
class GameController(object): | |
def __init__(self): | |
pygame.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DestructoWorld |