diff options
author | Mark Powers <markppowers0@gmail.com> | 2020-05-17 12:17:29 -0500 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2020-05-17 12:17:29 -0500 |
commit | 000b1bcc517891a16bcccc313079c96f214b6f40 (patch) | |
tree | 345de5612c3f36805f27da85cd8393535f91326e /src/pp | |
parent | c4fc7e2056db1ca0c5fdead9751c5e3d15cf99ab (diff) |
Minor update
Diffstat (limited to 'src/pp')
-rw-r--r-- | src/pp/static/main.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pp/static/main.js b/src/pp/static/main.js index a9689ad..5930b32 100644 --- a/src/pp/static/main.js +++ b/src/pp/static/main.js @@ -125,7 +125,7 @@ function loadTemplate() { for (var y = 0; y < template[layer][x].length; y++) { board[layer][x].push(undefined) if (template[layer][x][y]) { - board[layer][x][y] = items.pop() + board[layer][x][y] = items.pop() % 8 } } } @@ -283,28 +283,21 @@ var mouseDownCallback = function (e) { break } } - console.log(tileLayer, tileX, tileY) if (tileLayer != undefined && board[tileLayer][tileX] != undefined && board[tileLayer][tileX][tileY] != undefined) { - console.log("inside if") if (selectedX != undefined && selectedY != undefined && selectedLayer != undefined) { - console.log("inside if 2") if (board[selectedLayer][selectedX][selectedY] != undefined && (tileX != selectedX || tileY != selectedY) && (board[tileLayer][tileX + 1][tileY] == undefined || board[tileLayer][tileX - 1][tileY] == undefined)) { - console.log("inside if 3") - console.log(board[selectedLayer][selectedX][selectedY], board[tileLayer][tileX][tileY]) if (board[selectedLayer][selectedX][selectedY] == board[tileLayer][tileX][tileY]) { - console.log("inside if 4") board[selectedLayer][selectedX][selectedY] = undefined - board[selectedLayer][tileX][tileY] = undefined + board[tileLayer][tileX][tileY] = undefined } } } if (board[tileLayer][tileX + 1][tileY] == undefined || board[tileLayer][tileX - 1][tileY] == undefined) { - console.log("new selection") selectedLayer = tileLayer selectedX = tileX selectedY = tileY |