diff --git a/src/snake.ts b/src/snake.ts index 0cd4283..fd1ba48 100644 --- a/src/snake.ts +++ b/src/snake.ts @@ -91,6 +91,8 @@ class SnakeCore { } while (this.body.length > 0) this.body.pop(); + while (g_snakebot.path.length > 0) + g_snakebot.path.pop(); this.startRandom(); this.foodRegen(); this.draw();