From 7380f8eb444fcd0c793095948a52b9688a3f4d11 Mon Sep 17 00:00:00 2001 From: hexahigh <97455552+hexahigh@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:39:49 +0200 Subject: [PATCH] test pacman --- Games/Pacman/index.html | 15 --------------- Games/Pacman/js/cheats.js | 0 Games/Pacman/pacman-canvas.js | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 Games/Pacman/js/cheats.js 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