From 82b3e846a09c0ad7612d43e3b9345fd56a043684 Mon Sep 17 00:00:00 2001 From: Mike Smith <89040888+smiggiddy@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:33:59 -0500 Subject: [PATCH] refactor: remove unncessary code --- tictactoe/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tictactoe/js/main.js b/tictactoe/js/main.js index cfd4d52..209ac48 100644 --- a/tictactoe/js/main.js +++ b/tictactoe/js/main.js @@ -180,8 +180,8 @@ const gameController = (() => { [gameBoard[0][2], gameBoard[1][1], gameBoard[2][0]] ]; - let checkGameBoard = [gameBoard, vertArray, [diagArray[0]], [diagArray[1]]]; - for (i = 0; i < 4; i++) { + let checkGameBoard = [gameBoard, vertArray, diagArray]; + for (i = 0; i < 3; i++) { let outcome = _evalGameOutcome(checkGameBoard[i]); if (outcome) { return true;