From d91c92370fd1910e73bbee5bcd22ef53d8fcf53d Mon Sep 17 00:00:00 2001 From: Dominic DiTaranto Date: Sun, 7 Sep 2025 23:56:27 -0400 Subject: [PATCH] fix issue --- assets/script.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/assets/script.js b/assets/script.js index 8795570..97ebe27 100644 --- a/assets/script.js +++ b/assets/script.js @@ -8,6 +8,18 @@ class Game { this.points = 0; this.totalMoves = 0; this.levelMoves = {}; + this.traditional = false; + } + + toggleTraditional() { + if (this.traditional) { + this.traditional = false; + } else { + this.traditional = true; + } + + this.mapInstance.traditional = this.traditional; + this.mapInstance.display(); } initializeLevel() { @@ -50,7 +62,7 @@ class Map { this.totalWin = g.level + 1 == levels.length; this.finalPointsGiven = false; - this.traditional = false; + this.traditional = g.traditional; } generateMapArray() {