We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c48b926 commit a6531b0Copy full SHA for a6531b0
js/local_storage_manager.js
@@ -39,6 +39,7 @@ LocalStorageManager.prototype.localStorageSupported = function () {
39
}
40
};
41
42
+// Best score getters/setters
43
LocalStorageManager.prototype.getBestScore = function () {
44
return this.storage.getItem(this.bestScoreKey) || 0;
45
@@ -47,6 +48,7 @@ LocalStorageManager.prototype.setBestScore = function (score) {
47
48
this.storage.setItem(this.bestScoreKey, score);
49
50
51
+// Game state getters/setters and clearing
52
LocalStorageManager.prototype.getGameState = function () {
53
var stateJSON = this.storage.getItem(this.gameStateKey);
54
return stateJSON ? JSON.parse(stateJSON) : null;
0 commit comments