From 1d17a10e09e8c031b5637eebf06d9b49f340b768 Mon Sep 17 00:00:00 2001 From: Dominic DiTaranto Date: Sun, 7 Sep 2025 23:47:14 -0400 Subject: [PATCH] traditional --- assets/script.js | 41 +++++++++++++++++++++++++---------------- index.html | 7 ++++++- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/assets/script.js b/assets/script.js index 4c1c192..8795570 100644 --- a/assets/script.js +++ b/assets/script.js @@ -50,6 +50,7 @@ class Map { this.totalWin = g.level + 1 == levels.length; this.finalPointsGiven = false; + this.traditional = false; } generateMapArray() { @@ -85,7 +86,11 @@ class Map { getKeystroke() { var self = this; _listener = function (event) { - if (["Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].indexOf(event.code) > -1) { + if ( + ["Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].indexOf( + event.code, + ) > -1 + ) { event.preventDefault(); } var dontLoop = false; @@ -155,22 +160,26 @@ class Map { let map = ""; for (let i = 0; i < this.mapArray.length; i++) { for (let j = 0; j < this.mapArray[i].length; j++) { - if (this.mapArray[i][j] === "#") { - map += ''; - } else if (this.mapArray[i][j] === " ") { - map += ''; - } else if (this.mapArray[i][j] === "0") { - map += ''; - } else if (this.mapArray[i][j] === "*") { - map += ''; - } else if (this.mapArray[i][j] === "@") { - if (!grillChar) { - map += ``; - } else { - map += ``; + if (this.traditional) { + map += this.mapArray[i][j]; + } else { + if (this.mapArray[i][j] === "#") { + map += ''; + } else if (this.mapArray[i][j] === " ") { + map += ''; + } else if (this.mapArray[i][j] === "0") { + map += ''; + } else if (this.mapArray[i][j] === "*") { + map += ''; + } else if (this.mapArray[i][j] === "@") { + if (!grillChar) { + map += ``; + } else { + map += ``; + } + } else if (this.mapArray[i][j] === ".") { + map += ''; } - } else if (this.mapArray[i][j] === ".") { - map += ''; } } map += "
"; diff --git a/index.html b/index.html index db71092..ebdae4c 100644 --- a/index.html +++ b/index.html @@ -104,7 +104,12 @@ settings
- toggle D-Pad + toggle D-Pad
+ toggle Graphics