diff --git a/tictactoe/6/script.js b/tictactoe/6/script.js index cfb1697..5140681 100644 --- a/tictactoe/6/script.js +++ b/tictactoe/6/script.js @@ -28,7 +28,8 @@ function startGame() { function turnClick(square) { if (typeof origBoard[square.target.id] == 'number') { turn(square.target.id, huPlayer) - if (!checkTie()) turn(bestSpot(), aiPlayer); + if (!checkTie() && !checkWin(origBoard, huPlayer)) turn(bestSpot(), aiPlayer); + } }