diff --git a/index.html b/index.html index 575c62a804d11f98ae236bbd21c5379794614c8d..25f49c911fa1061fdd18005549937604c75c931e 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@

- Keep playing + Keep playing Try again
diff --git a/js/game_manager.js b/js/game_manager.js index 95f75e58ad03c7e316715e31051ae5c202b0e895..8161f8e2feba315bab6d8d4c9f4e85aa3c3ef099 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -15,25 +15,23 @@ function GameManager(size, InputManager, Actuator, ScoreManager) { // Restart the game GameManager.prototype.restart = function () { - this.actuator.restart(); + this.actuator.continue(); this.setup(); }; // Keep playing after winning GameManager.prototype.keepPlaying = function () { this.keepPlaying = true; - this.actuator.keepPlaying(); + this.actuator.continue(); }; -GameManager.prototype.isGameOver = function() { - if (this.over || (this.won && !this.keepPlaying) ) { +GameManager.prototype.isGameOver = function () { + if (this.over || (this.won && !this.keepPlaying)) { return true; - } - else { + } else { return false; } -} - +}; // Set up the game GameManager.prototype.setup = function () { diff --git a/js/html_actuator.js b/js/html_actuator.js index adfff59e7eb90b3c9149c51599ddfc366697a50b..25394acb7a4c66247db077a51327f9283024d4c1 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -32,11 +32,8 @@ HTMLActuator.prototype.actuate = function (grid, metadata) { }); }; -HTMLActuator.prototype.restart = function () { - this.clearMessage(); -}; - -HTMLActuator.prototype.keepPlaying = function () { +// Continues the game (both restart and keep playing) +HTMLActuator.prototype.continue = function () { this.clearMessage(); };