src/demo/TicTacToe.java
public GameStatus updateGameStatus(Player player) {
            if (checkWinner(player)) return player.playerRole == PlayerRole.NOUGHT ? GameStatus.NOUGHT_WON : GameStatus.CROSS_WON;
            else {
                if (noAvailableMoves()) return GameStatus.DRAW;
                else return GameStatus.ONGOING;
            }
        }
/**
         * Updates state of game after action is taken.
         *
         * @param player current player.
         * @return state of game.
         */
Updates state of game after action is taken.
@param player current player.
@return state of game.
Updates state of game after action is taken . @param player current player . @return state of game .
public GameStatus updateGameStatus(Player player) {
            if (checkWinner(player)) return player.playerRole == PlayerRole.NOUGHT ? GameStatus.NOUGHT_WON : GameStatus.CROSS_WON;
            else {
                if (noAvailableMoves()) return GameStatus.DRAW;
                else return GameStatus.ONGOING;
            }
        }
public GameStatus updateGameStatus ( Player player ) { if ( checkWinner ( player ) ) return player . playerRole == PlayerRole . NOUGHT ? GameStatus . NOUGHT_WON : GameStatus . CROSS_WON ; else { if ( noAvailableMoves ( ) ) return GameStatus . DRAW ; else return GameStatus . ONGOING ; } }
Updates state of game after action is taken.
Updates state of game after action is taken .