From 965c0ccd1dfe44749dc1e26c1c6c4ca0e1237c3b Mon Sep 17 00:00:00 2001 From: alterdekim Date: Fri, 15 Mar 2024 20:14:03 +0300 Subject: [PATCH] chips moves fix #2 --- src/main/resources/static/javascript/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/javascript/game.js b/src/main/resources/static/javascript/game.js index e58245c..d23c963 100644 --- a/src/main/resources/static/javascript/game.js +++ b/src/main/resources/static/javascript/game.js @@ -180,7 +180,7 @@ function moveChipTo(chip) { $(chip.dom).css("background-color", chip.color); let offsetY = (Math.max(chip.y-1, 0) * 55) + (chip.y * 2) + (clamp(chip.y, 0, 1) * 100) + 18; let offsetX = (Math.max(chip.x-1, 0) * 55) + (chip.x * 2) + (clamp(chip.x, 0, 1) * 100); - let a = board.chips.filter((c) => c.x == position.x && c.y == position.y && c.uid != 0); + let a = board.chips.filter((c) => c.x == chip.x && c.y == chip.y && c.uid != 0); let num = -1; for( let i = 0; i < a.length; i++ ) { if(a[i].uid == chip.uid) {