diff --git a/square-shooter/square-shooter_makeover.py b/square-shooter/square-shooter_makeover.py index 587cbc9..b17dfc5 100644 --- a/square-shooter/square-shooter_makeover.py +++ b/square-shooter/square-shooter_makeover.py @@ -606,23 +606,22 @@ def render_pause_text(self): pygame.display.set_caption("Square Shooter Desktop Edition") pygame.event.set_blocked(pygame.MOUSEMOTION) -running = True -while running: +while True: delta_t = clock.tick(60) if DISPLAY_FPS: renderer.fps = int(round(clock.get_fps())) ev = pygame.event.poll() if ev.type == pygame.QUIT: - running = False + break elif ev.type == pygame.KEYUP: if ev.key == pygame.K_ESCAPE: - running = False + break elif ev.key == pygame.K_q: if world.level > 0: world.level = 0 else: - running = False + break elif ev.key == pygame.K_p: if world.level == 0: world.score = 0