diff --git a/Games/Pacman/index.html b/Games/Pacman/index.html index 8099b31..954534e 100644 --- a/Games/Pacman/index.html +++ b/Games/Pacman/index.html @@ -51,21 +51,6 @@ - - diff --git a/Games/Pacman/js/cheats.js b/Games/Pacman/js/cheats.js new file mode 100644 index 0000000..e69de29 diff --git a/Games/Pacman/pacman-canvas.js b/Games/Pacman/pacman-canvas.js index b0811fc..db4900a 100644 --- a/Games/Pacman/pacman-canvas.js +++ b/Games/Pacman/pacman-canvas.js @@ -158,6 +158,20 @@ function geronimo() { // Manages the whole game ("God Object") function Game() { + + + + this.cheatHealth = function () { + this.score.set(0); + this.score.refresh(".score"); + pacman.lives = 100; + this.refreshLevel(".level"); + this.pause = false; + this.gameOver = false; + }; + this.cheatHealth(); + + this.timer = new Timer(); // TODO: implememnt properly, and submit with highscore this.refreshRate = 33; // speed of the game, will increase in higher levels