Merge branch 'master' into gh-pages

This commit is contained in:
Gabriele Cirulli
2014-03-12 13:33:24 +01:00
2 changed files with 10 additions and 5 deletions
+9
View File
@@ -3,6 +3,15 @@ A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.
Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
### Contributions
- [TimPetricola](https://github.com/warmwaffles) added best score storage
- [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile
Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions.
### Screenshot
[![Screenshot](http://pictures.gabrielecirulli.com/2048-20140309-234100.png)](http://pictures.gabrielecirulli.com/2048-20140309-234100.png)
That screenshot is fake, by the way. I never reached 2048 :smile:
+1 -5
View File
@@ -19,11 +19,7 @@ function LocalScoreManager() {
}
LocalScoreManager.prototype.get = function () {
var score = this.storage.getItem(this.key);
if (typeof score === "undefined" || score === null) {
score = 0;
}
return score;
return this.storage.getItem(this.key) || 0;
};
LocalScoreManager.prototype.set = function (score) {