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/index.html | 2 +- src/paperflight/static/levels.js | 2 +- src/pp/static/main.js | 11 ++--------- 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/index.html b/src/index.html index 75d8c00..ba8f42d 100644 --- a/src/index.html +++ b/src/index.html @@ -43,7 +43,7 @@
  • Math mini games
  • Picture pieces
  • Cosmic Cargo
  • -
  • Sim
  • +
  • Paper Flight
  • diff --git a/src/paperflight/static/levels.js b/src/paperflight/static/levels.js index 75a63af..48ea40c 100644 --- a/src/paperflight/static/levels.js +++ b/src/paperflight/static/levels.js @@ -26,7 +26,7 @@ levels[2].items.push( levels[3] = createLevel("Coins!", 1, 400, 250) levels[3].items.push( constructText(30, 60, "Collect the needed coins to continue", "30px Courier"), - constructCoin(400, 200) + constructCoin(300, 200) ) levels[4] = createLevel("Getting harder...", 0, 700, 200) 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