From 759eccd4198ee5546d5425be88c31ef53999c380 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Mon, 12 Apr 2021 07:37:19 +0100 Subject: [PATCH] Update code.js --- src/code.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/code.js b/src/code.js index 3d402a1..eb0985b 100644 --- a/src/code.js +++ b/src/code.js @@ -84,6 +84,8 @@ function win() { if (board[x][1][0] == board[x][2][0]) { + console.log("r: " + board[x][0][0]); + return board[x][0][0]; } } @@ -100,13 +102,15 @@ function win() { if (board[1][y][0] == board[2][y][0]) { + console.log("c: " + board[0][y][0]); + return board[0][y][0]; } } } } - // tr bl line + // tl br line if (board[0][0][0] != 0) { @@ -114,12 +118,14 @@ function win() { if (board[1][1][0] == board[2][2][0]) { + console.log("tr bl: " + board[0][0][0]); + return board[0][0][0]; } } } - // tl br line + // tr bl line if (board[0][2][0] != 0) { @@ -127,6 +133,8 @@ function win() { if (board[1][1][0] == board[2][0][0]) { + console.log("tl br: " + board[0][2][0]); + return board[0][2][0]; } }