From b0168b0c9524fe762a070aa252156c9d650595d3 Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Thu, 23 May 2024 09:24:46 +0100 Subject: Make game reset work --- TODO.org | 2 +- turbo.scm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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)))) -- cgit v1.2.3