Exemple #1
0
	def main():
		root = tk.Tk()
		root.title("Tic-Tac-Toe")
		root.geometry("800x600")
		Program.screen = Window(master=root)
		Program.screen.setGameOptionsModeScreen(Program.go2BoardScreen)
		Program.screen.mainloop()
Exemple #2
0
    def __init__(self):
        self._game = Game()
        self._window = Window(self._game)
        self._character = self._game.character
        self._window.draw()

        self.ifHasFailed = False
Exemple #3
0
    def reset(self):
        self._game.reset()
        self._window = Window(self._game)
        self._character = self._game.character
        self._window.draw()

        self.n = 0
        self.ifHasFailed = False
Exemple #4
0
    def reset(self):
        """
        Function: Resets the state of game but the map remains the same.
        """
        self._game.reset()
        self._window = Window(self._game)
        self._character = self._game.character
        self._window.draw()

        self.ifHasFailed = False
Exemple #5
0
        # pprint(axis_values)
        # print('-------------- Window.Window.joystick_assignments')
        # pprint(Window.Window.joystick_assignments)
        # print('--------------- Window.Window.channels')
        # pprint(Window.Window.channels)
        # print('------------------------------------')

        bsp.updateOutput(axis_values)

    elif button_change is True:
        bsp.send_gate_output(button_to_change, button_on)


if __name__ == "__main__":
    root = Tk()
    tksupport.install(root)
    app = Window.Window(root)
    # root.wm_title("ps4tomidi")
    ps4.init()

    deferred = handle_ps4_events()
    deferred.addCallback(handle_ps4_events)

    # reactor.callWhenRunning(handle_ps4_events)

    reactor.run()

    root.destroy()

    # reactor.callInThread(handle_ps4_events)