Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Get rid of the running variable.

  • Loading branch information...
commit bdb64d21e5dc6535dfcb8e89a20b84b60df72add 1 parent 5cdd7f0
@asweigart authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 square-shooter/square-shooter_makeover.py
View
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.