提交 af683a78 编写于 作者: G Gabriele Cirulli

clear game state on game over

上级 bf1ba513
......@@ -83,7 +83,12 @@ GameManager.prototype.actuate = function () {
this.storageManager.setBestScore(this.score);
}
this.storageManager.setGameState(this.serialize());
// Clear the state when the game is over (game over only, not win)
if (this.over) {
this.storageManager.clearGameState();
} else {
this.storageManager.setGameState(this.serialize());
}
this.actuator.actuate(this.grid, {
score: this.score,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册