Skip to content

Commit

Permalink
change the localstorage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gamalielhere committed Feb 3, 2016
1 parent 0a5944a commit 29b2263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var food;
var snake;
var score;
var highscore = localStorage.topScore;
var highscore = localStorage.topScore || 0;
var speed;
var headColor = "green",
colorFood = "yellow",
Expand Down

0 comments on commit 29b2263

Please sign in to comment.