Interface Player
- All Known Implementing Classes:
BotPlayer,HumanPlayer
Tic-tac-toe player interface for all players
// Create a human player
Player player = new HumanPlayer();
// Choose the next valid move on the game board
int validBoardLocation = player.nextMove(gameState);
-
Method Summary
-
Method Details
-
nextMove
Chooses the next valid move on the game board.- Parameters:
gameState- the current state of the game- Returns:
- the index of the next valid move on the board
-