예제 #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()
예제 #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()
예제 #3
0
파일: pweb_gui.py 프로젝트: zr8091/fun
    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)
예제 #4
0
파일: gui.py 프로젝트: 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()
예제 #5
0
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
예제 #6
0
파일: ants_gui.py 프로젝트: PMX10/projects
def run(*args):
    ants.start_with_strategy(args, AntsGUI().strategy)
예제 #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)
예제 #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)