Esempio 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()
Esempio 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()
Esempio 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)
Esempio n. 4
0
File: gui.py Progetto: 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()
Esempio n. 5
0
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
Esempio n. 6
0
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
Esempio 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)
Esempio 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)