From 6ad8aec36ff3fa3e84f0caf6de60634e56d85ea3 Mon Sep 17 00:00:00 2001 From: Paul Kappmeyer Date: Tue, 24 Oct 2023 14:50:28 +0200 Subject: [PATCH] keyboard input resumes the game --- snake.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/snake.js b/snake.js index 8d0a988..b0a3169 100644 --- a/snake.js +++ b/snake.js @@ -385,6 +385,10 @@ class Snake { } setMoveDirection(desiredDirection) { + if (running == false) { + toggleRunning(); + } + if (isOppositeDirection(this.direction, desiredDirection)) { return; }