Skip to content

Commit a6531b0

Browse files
add getter comments
1 parent c48b926 commit a6531b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/local_storage_manager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ LocalStorageManager.prototype.localStorageSupported = function () {
3939
}
4040
};
4141

42+
// Best score getters/setters
4243
LocalStorageManager.prototype.getBestScore = function () {
4344
return this.storage.getItem(this.bestScoreKey) || 0;
4445
};
@@ -47,6 +48,7 @@ LocalStorageManager.prototype.setBestScore = function (score) {
4748
this.storage.setItem(this.bestScoreKey, score);
4849
};
4950

51+
// Game state getters/setters and clearing
5052
LocalStorageManager.prototype.getGameState = function () {
5153
var stateJSON = this.storage.getItem(this.gameStateKey);
5254
return stateJSON ? JSON.parse(stateJSON) : null;

0 commit comments

Comments
 (0)