diff --git a/src/main.py b/src/main.py index 33916eb..c454087 100644 --- a/src/main.py +++ b/src/main.py @@ -7,6 +7,7 @@ TODO - ajouter des sons style arcade - faire un highscore (avec la gestion de l'utilisateur et les saves) - faire le systeme de succes + - mettre un easter egg """ import pygame @@ -15,10 +16,11 @@ from game import Game pygame.init() launch_game = True +running = True game = Game() -while True: +while running: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() elif event.type == pygame.KEYDOWN: launch_game = True @@ -26,4 +28,6 @@ while True: if launch_game: launch_game = False game.restart() - if game.run() == -1: pygame.quit() + if game.run() == -1: running = False + +pygame.quit()