Exemplo n.º 1
0
 def newGameThread(self):
     print("Trying to start new game")
     self.winner = ants.start_with_strategy(gui.args, gui.strategy)
     self.gameOver = True
     self.saveState("winner", self.winner)
     self.saveState("gameOver", self.gameOver)
     self.killGUI()
     update()
Exemplo n.º 2
0
 def newGameThread(self):
     print("Trying to start new game")
     self.winner = ants.start_with_strategy(gui.args, gui.strategy)
     self.gameOver = True
     self.saveState("winner", self.winner)
     self.saveState("gameOver", self.gameOver)
     self.killGUI()
     update()
Exemplo n.º 3
0
    def newGameThread(self):
        print("Trying to start new game")
        self.cleanState()  # resets GUI state
        importlib.reload(ants)  # resets ants, e.g. with newly implemented Ants
        self.makeHooks()

        self.winner = ants.start_with_strategy(gui.args, gui.strategy)
        self.gameOver = True
        self.saveState("winner", self.winner)
        self.saveState("gameOver", self.gameOver)
Exemplo n.º 4
0
Arquivo: gui.py Projeto: neehar-p/Ants
    def newGameThread(self):
        print("Trying to start new game")
        self.cleanState() # resets GUI state
        importlib.reload(ants) # resets ants, e.g. with newly implemented Ants
        self.makeHooks()

        self.winner = ants.start_with_strategy(gui.args, gui.strategy)
        self.gameOver = True
        self.saveState("winner", self.winner)
        self.saveState("gameOver", self.gameOver)
        # self.killGUI()
        update()
Exemplo n.º 5
0
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
Exemplo n.º 6
0
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
Exemplo n.º 7
0
def run(*args):
    ants.Insect.reduce_armor = class_method_wrapper(ants.Insect.reduce_armor,
            pre=print_expired_insects)
    ants.start_with_strategy(args, AntsGUI().strategy)
Exemplo n.º 8
0
def run(*args):
    ants.Insect.reduce_armor = class_method_wrapper(ants.Insect.reduce_armor,
            pre=print_expired_insects)
    ants.start_with_strategy(args, AntsGUI().strategy)