0
I dont know how to stop a game.plz see the 116th line of my code and help me to stop it.Thank you
2 Answers
+ 3
You just need to break out of your game loop. You could set a boolean in your if block after alert("lose") and then make an if block in your game loop that checks that boolean. If true break. Then maybe add a start button or try agian button that starts/restarts the game.
0
Maybe you can add:
alert("Try again");
snake.total=1;
and then somehow clear all pixels the snake has coloured....
I dobt know more know as I dont know web and html......
Please tell me the result