From 6a44c47fcef5f645879780b0b5f287cfb60be088 Mon Sep 17 00:00:00 2001 From: IgrisBRC Date: Mon, 15 Jul 2024 17:18:34 +0530 Subject: added check detection, for now only console loggin when check --- public/make_move.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'public/make_move.js') diff --git a/public/make_move.js b/public/make_move.js index 16d738b..07211dc 100644 --- a/public/make_move.js +++ b/public/make_move.js @@ -1,5 +1,11 @@ function make_move(board, y ,x, new_y, new_x) { board[new_y][new_x] = board[y][x] board[y][x] = 0 + + check = check_check(board, to_move, check) + + if (check) { + console.log("check") + } } -- cgit v1.2.3