From 000b1bcc517891a16bcccc313079c96f214b6f40 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Sun, 17 May 2020 12:17:29 -0500 Subject: Minor update --- src/pp/static/main.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/pp') 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 -- cgit v1.2.3