def initialize(self): self.screen = Display.get_instance().display self.screen.fill((0, 0, 0)) if self.instant: if randint(0, 1) == 0: self.attacker_wins() else: self.defender_wins()
def initialize(self): if not self.initialized: self.map.initialize() self.screen = Display.get_instance().display self.initialized = True
def __init__(self, initial): Display.get_instance() self.current_state = initial(self) self.next_state = None