From c29bce724f0ea3ba4fe12f57423a7d2b7394875b Mon Sep 17 00:00:00 2001 From: mehbark Date: Fri, 2 May 2025 22:31:55 -0400 Subject: [PATCH] restart functionality --- main.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.gd b/main.gd index 6a1a7d5..0816bcb 100644 --- a/main.gd +++ b/main.gd @@ -43,9 +43,10 @@ func _input(event: InputEvent) -> void: elif event.is_action_pressed("restart", true, true): restart() -# TODO: +# TODO: make restart undoable? func restart(): - pass + while hist.has_undo(): + hist.undo() func step(move: Vector2i): var pos := player.lpos