From 3e8f15e6691c1bcdca15334e3fe2a50e27b83cf3 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Sun, 11 Apr 2021 21:08:31 +0100 Subject: [PATCH] obeys where things are placed --- src/code.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/code.js b/src/code.js index 0a8ff9d..f797998 100644 --- a/src/code.js +++ b/src/code.js @@ -41,6 +41,11 @@ var ptm = 1; function move(id) { + if (board[ids[id][0]][ids[id][1]][0] != 0) + { + return; + } + var charater = ""; if (ptm == 1) @@ -57,4 +62,5 @@ function move(id) } board[ids[id][0]][ids[id][1]][1].innerHTML = charater; + board[ids[id][0]][ids[id][1]][0] = charater; } \ No newline at end of file