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 bf1ba51 commit af683a7Copy full SHA for af683a7
js/game_manager.js
@@ -83,7 +83,12 @@ GameManager.prototype.actuate = function () {
83
this.storageManager.setBestScore(this.score);
84
}
85
86
- this.storageManager.setGameState(this.serialize());
+ // Clear the state when the game is over (game over only, not win)
87
+ if (this.over) {
88
+ this.storageManager.clearGameState();
89
+ } else {
90
+ this.storageManager.setGameState(this.serialize());
91
+ }
92
93
this.actuator.actuate(this.grid, {
94
score: this.score,
0 commit comments