Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions car race/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def terminate():
pygame.quit()
sys.exit()

# before pressing key
def waitForPlayerToPressKey():
while True:
for event in pygame.event.get():
Expand All @@ -28,7 +28,7 @@ def waitForPlayerToPressKey():
if event.key == K_ESCAPE: #escape quits
terminate()
return

# if wrong key pressed
def playerHasHitBaddie(playerRect, baddies):
for b in baddies:
if playerRect.colliderect(b['rect']):
Expand Down