From a6531b08bdf7cea4e402dda078e8016563cce401 Mon Sep 17 00:00:00 2001 From: Gabriele Cirulli Date: Sat, 22 Mar 2014 16:29:23 +0100 Subject: [PATCH] add getter comments --- js/local_storage_manager.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/local_storage_manager.js b/js/local_storage_manager.js index 74e5ee8..776e94b 100644 --- a/js/local_storage_manager.js +++ b/js/local_storage_manager.js @@ -39,6 +39,7 @@ LocalStorageManager.prototype.localStorageSupported = function () { } }; +// Best score getters/setters LocalStorageManager.prototype.getBestScore = function () { return this.storage.getItem(this.bestScoreKey) || 0; }; @@ -47,6 +48,7 @@ LocalStorageManager.prototype.setBestScore = function (score) { this.storage.setItem(this.bestScoreKey, score); }; +// Game state getters/setters and clearing LocalStorageManager.prototype.getGameState = function () { var stateJSON = this.storage.getItem(this.gameStateKey); return stateJSON ? JSON.parse(stateJSON) : null;