JavaScript-Snake
JavaScript-Snake copied to clipboard
Highscore check doesn't seem to work anymore
Noticed that the alert notifying the player that they beat their high score does not run anymore, and seems like it's due to jsSnakeHighScore being set whenever the snake eats food (and foodEaten gets called) and snake has a length greater than high score.
Also, should alert be used for this sort of thing, or would it be better to move this into a new dialog box?
For some odd reason, it works on Safari... but the highscore also starts with undefined (if it's first time playing)... 🤔