Refactor code

This commit is contained in:
Gabriel Augendre 2018-04-30 20:40:57 +02:00
parent f06e0d5d47
commit 789be9c5d8
No known key found for this signature in database
GPG Key ID: F360212F958357D4
1 changed files with 2 additions and 4 deletions

View File

@ -108,8 +108,8 @@ def main():
screen.blit(text, text_rect)
pygame.display.flip()
while True:
restart = False
restart = False
while not restart:
for event in pygame.event.get():
if event.type == pglocals.QUIT:
logger.info('Received QUIT event')
@ -119,8 +119,6 @@ def main():
if event.key == pglocals.K_r:
logger.debug('Restarting game')
restart = True
if restart:
break
clock.tick(5)