def __init__(self, anchor=ORIGIN, coords=DEFAULT_COORDS, commands=DEFAULT_COMMANDS): self.coords = coords self.cardinals = get_cardinals(self.coords) Graphic.__init__(self, anchor, self.cardinals) self.commands = self.initialize_commands(commands) self.drawing_kit = dict(DEFAULT_DRAWING_KIT) self.decoration = [] self.effects = []
def __init__(self): pg.init() pg.display.set_caption("TicTacToe") self.WIDTH = 600 self.HEIGHT = self.WIDTH self.screen = pg.display.set_mode((self.WIDTH, self.HEIGHT)) self.board = [[None for i in range(3)] for i in range(3)] Graphic.__init__(self, self.screen, self.board) self.player = 1 # x = 1, o = 0 self.run = True self.result = None self.whoiswho = {} self.begin_screen() self.game()
def __init__(self, *elements): Graphic.__init__(self) self.elements = [] self.initialize_elements(*elements) self.update_epochs() self.external_call = False