From b99fd39e041b1bdc5c770e05578ec8487465439a Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Mon, 12 Apr 2021 10:38:21 +0100 Subject: [PATCH] Update code.js --- src/code.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/code.js b/src/code.js index 8e5ac90..199e799 100644 --- a/src/code.js +++ b/src/code.js @@ -144,7 +144,18 @@ function win() } } - return 0; + for (var x = 0; x <= 2; x++) + { + for (var y = 0; y <= 2; y++) + { + if (board[x][y][0] == 0) + { + return 0; + } + } + } + + return 3; } function reset()