def __on_event(event): if event.type == pygame.QUIT: App.__running = False elif event.type == pygame.KEYDOWN: if event.key == pygame.K_DOWN: App.__options = (App.__options + 1) % 3 elif event.key == pygame.K_UP: App.__options = (App.__options - 1) % 3 elif event.key == pygame.K_RETURN or event.key == pygame.K_SPACE: if App.__options == 0: App.__game = Games.Game(App.__display_surf) App.__game.on_execute() elif App.__options == 1: print("How to Play") elif App.__options == 2: App.__running = False
import tkinter as tk import Games GnG = Games.Game() GnG.new_game() tk.mainloop()