aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGene Pasquet <dev@etenil.net>2024-05-23 09:24:46 +0100
committerGene Pasquet <dev@etenil.net>2024-05-23 09:24:46 +0100
commitb0168b0c9524fe762a070aa252156c9d650595d3 (patch)
tree585e84f4e56effd6ff1e0c62758069802173d6c3
parent46c678537885a6d815f0ba4b2b8a8b16500ae07e (diff)
Make game reset work
-rw-r--r--TODO.org2
-rw-r--r--turbo.scm1
2 files changed, 2 insertions, 1 deletions
diff --git a/TODO.org b/TODO.org
index 8cac592..7f4497a 100644
--- a/TODO.org
+++ b/TODO.org
@@ -8,7 +8,7 @@
*** DONE Ensure vehicles don't overlap
** DONE Detect collision with other vehicles
** DONE Make cars in different lanes drive at different speeds
-** TODO Add restart option
+** DONE Add restart option
** TODO Smooth acceleration
** TODO Smooth increasing turn rate
** TODO Display level on screen
diff --git a/turbo.scm b/turbo.scm
index 1c32f01..63ebe0a 100644
--- a/turbo.scm
+++ b/turbo.scm
@@ -258,6 +258,7 @@
(set-player-speed! (+ 1 player-min-speed))
(set! player-rotation 0)
(source-play engine-sound)
+ (for-each vehicle-reset-ahead vehicles)
;; Reset all vehicles
(set! game-over #f))))