function checkWinner() {
    rowWinner = checkRows(gameBoard);
    columnWinner = checkColumns(gameBoard);
    diagonalWinner = checkDiagonals(gameBoard);

    if (rowWinner) {
        winner = rowWinner;
    } else if (columnWinner) {
        winner = columnWinner;
    } else if (diagonalWinner) {
        winner = diagonalWinner;
    }

    if (winner !== null) {
        gameStillGoing = false;
    }
}
// Checks if there is a winner

Checks if there is a winner
Checks if there is a winner
function checkWinner() {
    rowWinner = checkRows(gameBoard);
    columnWinner = checkColumns(gameBoard);
    diagonalWinner = checkDiagonals(gameBoard);
    if (rowWinner) {
        winner = rowWinner;
    } else if (columnWinner) {
        winner = columnWinner;
    } else if (diagonalWinner) {
        winner = diagonalWinner;
    }
    if (winner !== null) {
        gameStillGoing = false;
    }
}
function checkWinner ( ) { rowWinner = checkRows ( gameBoard ) ; columnWinner = checkColumns ( gameBoard ) ; diagonalWinner = checkDiagonals ( gameBoard ) ; if ( rowWinner ) { winner = rowWinner ; } else if ( columnWinner ) { winner = columnWinner ; } else if ( diagonalWinner ) { winner = diagonalWinner ; } if ( winner !== null ) { gameStillGoing = false ; } }
Checks if there is a winner
Checks if there is a winner