snake: clear path on reset

This commit is contained in:
Trianta 2024-11-05 18:26:53 -06:00
parent 61f59208a0
commit 2916b4e127

View File

@ -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();