User prompt
The designs that I add in the game should reflect in the preview
User prompt
When pressing again in game over, it saves the previous high score
User prompt
When you press again in game over, it shows your previous high score
User prompt
Show high score under the score
User prompt
Fix Bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'getItem')' in this line: 'var highScore = localStorage.getItem('highScore') || 0;' Line Number: 92
User prompt
High score of a player is shown
User prompt
Add design to score text
User prompt
The score don't is bold
User prompt
Increase size of dot, snake, and snake body
Remix started
Copy Snake
===================================================================
--- original.js
+++ change.js
@@ -88,9 +88,9 @@
self.y = marginY;
var dots = [];
var snake = self.addChild(new Snake());
var score = 0;
- var highScore = localStorage.getItem('highScore') || 0;
+ var highScore = typeof localStorage !== 'undefined' && localStorage.getItem('highScore') || 0;
var scoreTxt = new Text2(score.toString(), {
size: 150,
fill: "#1a2314",
font: "'Courier New', monospace",