Compare commits
No commits in common. "4e435da82b39e2b6aeea1439b9baeed656fbf3ae" and "50fa9b0f5c6f306f9975a293c203394eefbc3a68" have entirely different histories.
4e435da82b
...
50fa9b0f5c
2 changed files with 18 additions and 32 deletions
|
@ -50,7 +50,6 @@ class Map {
|
|||
|
||||
this.totalWin = g.level + 1 == levels.length;
|
||||
this.finalPointsGiven = false;
|
||||
this.traditional = false;
|
||||
}
|
||||
|
||||
generateMapArray() {
|
||||
|
@ -86,11 +85,7 @@ 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;
|
||||
|
@ -160,9 +155,6 @@ 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.traditional) {
|
||||
map += this.mapArray[i][j];
|
||||
} else {
|
||||
if (this.mapArray[i][j] === "#") {
|
||||
map += '<img src="assets/img/sprites/wall.png">';
|
||||
} else if (this.mapArray[i][j] === " ") {
|
||||
|
@ -181,7 +173,6 @@ class Map {
|
|||
map += '<img src="assets/img/sprites/grill.png">';
|
||||
}
|
||||
}
|
||||
}
|
||||
map += "<br>";
|
||||
}
|
||||
|
||||
|
|
|
@ -104,12 +104,7 @@
|
|||
<a href="#" onclick="toggleDisplay('opts-menu')">settings</a>
|
||||
</div>
|
||||
<div class="opts-menu" id="opts-menu">
|
||||
<a href="#" onclick="toggleDisplay('dpad')">toggle D-Pad</a><br />
|
||||
<a
|
||||
href="#"
|
||||
onclick="if (g.mapInstance.traditional) {g.mapInstance.traditional = false} else {g.mapInstance.traditional = true}; g.mapInstance.display()"
|
||||
>toggle Graphics</a
|
||||
>
|
||||
<a href="#" onclick="toggleDisplay('dpad')">toggle D-Pad</a>
|
||||
</div>
|
||||
<center>
|
||||
<pre style="margin-top: 30px">
|
||||
|
@ -202,7 +197,7 @@
|
|||
<h4>UPDATES:</h4>
|
||||
<li>
|
||||
(09/07/25) v1.1: released mobile support via toggleable Dpad, see
|
||||
settings at top right of page! Also added support for traditional graphics... also see settings.
|
||||
settings at top right of page!
|
||||
</li>
|
||||
<h4>TODO:</h4>
|
||||
<ul>
|
||||
|
|
Loading…
Reference in a new issue