提交 2f912471 编写于 作者: G Gabriele Cirulli

improve comments in game manager

上级 6cb3d71a
...@@ -16,14 +16,14 @@ function GameManager(size, InputManager, Actuator, StorageManager) { ...@@ -16,14 +16,14 @@ function GameManager(size, InputManager, Actuator, StorageManager) {
// Restart the game // Restart the game
GameManager.prototype.restart = function () { GameManager.prototype.restart = function () {
this.storageManager.clearGameState(); this.storageManager.clearGameState();
this.actuator.continue(); this.actuator.continue(); // Clear the game won/lost message
this.setup(); this.setup();
}; };
// Keep playing after winning // Keep playing after winning (allows going over 2048)
GameManager.prototype.keepPlaying = function () { GameManager.prototype.keepPlaying = function () {
this.keepPlaying = true; this.keepPlaying = true;
this.actuator.continue(); this.actuator.continue(); // Clear the game won/lost message
}; };
// Return true if the game is lost, or has won and the user hasn't kept playing // Return true if the game is lost, or has won and the user hasn't kept playing
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册