Updated: fixed memory leak
This commit is contained in:
parent
2ed8fae5d6
commit
222b838e53
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue