Updated: fixed memory leak

This commit is contained in:
Lian Drake 2023-12-08 19:57:44 -04:00
parent 2ed8fae5d6
commit 222b838e53

View file

@ -507,7 +507,9 @@ void run() {
switch (choice) { switch (choice) {
case '1': case '1':
if (!isAlive) { if (!isAlive) {
cleanup();
snake = startSnake(); snake = startSnake();
apple = startApple();
isAlive = true; isAlive = true;
speed = minSpeed; speed = minSpeed;
} }