def main(self): while not self.done: self.events_input() self.display_frame() self.run_logic() if self.choice == "Play": GameLoop.Game(self.screen).main() elif self.choice == "Tutorial": pass #Instruction.Instruction(self.screen).main() elif self.choice == "Ranking": Ranking.Ranking(self.screen).main() elif self.choice == "Options": pass elif self.choice == "Quit": pygame.quit() sys.exit()
import GameLoop loop = GameLoop.Game(40, 40, 600, 600, "SnakeNN") loop.input_handle()