Skip to content

Instantly share code, notes, and snippets.

class Action:
MOVE = 0
ATTACK = 1
HOLD_POSITION = 2
def get_attacked(thing)
thing.get_attacked()
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))
class Constant:
def __init__(self, value):
self.value = value
def __call__(self, *args, **kwargs):
return self.value
class Function:
import pygame
from pygame.locals import *
class GameController:
def __init__(self, width, height):
pygame.init()
self.width = width
self.height = height
self.running = True
import pygame
from pygame.locals import *
class GameController:
def __init__(self, width, height):
pygame.init()
self.width = width
self.height = height
self.running = True
import pygame
from pygame.locals import *
WIDTH = 1024
HEIGHT = 768
class GameController(object):
def __init__(self):
pygame.init()