Beispiel #1
0
 def run(self):
     window = Window(theme="black")
     window.init(self.container, self._chatReceiver.updateCoords, self.pause, self.refreshing, self._speaker)
     screen_reader_thread = Thread(target=self.run_loop, args=(window.refresh,), daemon=True)
     voice_thread = Thread(target=self._speaker.loop, daemon=True)
     voice_thread.start()
     screen_reader_thread.start()
     window.mainloop()
     self.terminate.set()
     screen_reader_thread.join()
     self.container.saveConfig()
Beispiel #2
0
def main():
    try:
        import mrx
    except ImportError:
        print(
            "Failed to load Mr. X AI.  Make sure it is in this directory and named 'mrx.py'"
        )
        exit(1)
    try:
        import detectives
    except ImportError:
        print(
            "Failed to load the detective AI.  Make sure it is in this directory and named 'detectives.py'"
        )
        exit(1)
    the_game = Game(mrx, detectives)
    win = Window(the_game)

    win.mainloop()
Beispiel #3
0
 def confirm(self, role):
     self.destroy()
     the_game = Game(mrx, detectives, self.player_number)
     win = Window(the_game, self.mode, self.player_number, role)
     win.mainloop()
Beispiel #4
0
def main():
    app = App("config.json")
    root = Tk()
    window = Window(app, root)
    window.mainloop()