We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b24a43 commit 935002cCopy full SHA for 935002c
Metro/Metro_RP2350_Breakout/code.py
@@ -177,6 +177,8 @@ def check_keys():
177
r_pressed = True
178
elif key == ' ': # Space for start/launch
179
s_pressed = True
180
+ elif key in ('q', 'Q') or ord(key) == 27: # q, Q, or ESC is quit
181
+ sys.exit(0) # We're out of here
182
except Exception as e: # pylint: disable=broad-except
183
print("Input error:", e)
184
@@ -420,7 +422,7 @@ def update_message(text):
420
422
if lives <= 0:
421
423
game_active = False
424
game_over = True
- update_message("GAME OVER - Press SPACE to play again")
425
+ update_message("GAME OVER - Press SPACE to play again, Q to quit")
426
427
# Play game over sound
428
play_game_over()
0 commit comments