From 338f7060a610eb848a0499d7cc3ca313ebd03a04 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Sat, 15 May 2021 11:36:01 +0100 Subject: [PATCH] fixed issues --- src/code.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/code.js b/src/code.js index 91837e3..599222c 100755 --- a/src/code.js +++ b/src/code.js @@ -47,6 +47,8 @@ function move(id) info['go'].innerHTML = charater + "'s Go"; var pre = calculate(); + + resetPrediction(); board[pre[0]][pre[1]][1].parentElement.classList.add('predict'); } @@ -142,6 +144,8 @@ function reset() tabloid.classList.remove('win'); tabloid.classList.remove('lol'); + + resetPrediction(); load(); } @@ -207,4 +211,15 @@ function calculate() { return [0, 2]; } +} + +function resetPrediction() +{ + for (var x in board) + { + for (var y in board[x]) + { + board[x][y][1].parentElement.classList.remove('predict'); + } + } } \ No newline at end of file