Skip to content

Commit

Permalink
add getter comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielecirulli committed Mar 22, 2014
1 parent c48b926 commit a6531b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/local_storage_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ LocalStorageManager.prototype.localStorageSupported = function () {
}
};

// Best score getters/setters
LocalStorageManager.prototype.getBestScore = function () {
return this.storage.getItem(this.bestScoreKey) || 0;
};
Expand All @@ -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;
Expand Down

0 comments on commit a6531b0

Please sign in to comment.