summaryrefslogtreecommitdiff
path: root/super-bloom
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-06-04 11:59:31 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-06-04 11:59:31 -0400
commite1a8ca14ad02259ec8725b3b1c3914494eeb044f (patch)
tree88070f0b087865e850c641f372c0b2f586ea9437 /super-bloom
parent6e463239b7869fc9f16f0593c0ec1af39072050a (diff)
Quit when escape is pressed.
Diffstat (limited to 'super-bloom')
-rw-r--r--super-bloom/game.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/super-bloom/game.scm b/super-bloom/game.scm
index 11c19d1..ee288c5 100644
--- a/super-bloom/game.scm
+++ b/super-bloom/game.scm
@@ -244,7 +244,7 @@
(define-method (do-spray-water (mode <super-bloom-mode>))
(spray-water (player mode)))
-(define-method (do-quit (mode <super-bloom-mode>))
+(define-method (do-quit (mode <major-mode>))
(exit-catbird))
(define-method (update (mode <super-bloom-mode>) dt)
@@ -307,6 +307,7 @@
(clear (parent mode))
(replace-major-mode (parent mode) (make <super-bloom-mode>)))
+(bind-input <game-over-mode> (key-press 'escape) do-quit)
(bind-input <game-over-mode> (key-press 'z) do-reset)
(define-class <win-mode> (<major-mode>))
@@ -335,6 +336,7 @@
(clear (parent mode))
(replace-major-mode (parent mode) (make <super-bloom-mode>)))
+(bind-input <win-mode> (key-press 'escape) do-quit)
(bind-input <win-mode> (key-press 'z) do-reset)
(define (reset-game!)