gameState {rt3} | R Documentation |
The game state is represented by a list of 8 values.
Description
- board
The boards state represented by a list. It contains a list of X's, O's and EMPTY's. It's initially filled by EMPTY's.
- currentPlayer
The player who needs to make the next move. This either X or O.
- startingPlayer
the player who was the first player to move in this game state. This either X or O.
- moves
The list of moves made by players to get to this game state. This initially filled with 0's.
- movesP
The player turn list. It contains a list of alternating X's and O's
- numMoves
Number of moves made to get to this game state.
- isDone
This indicates wheter this is a final game state. It is final if either X or O has won if there is no winner: NONE.
- winner
If there is a winner in this games state the value is either X or O. If the game state is a draw or the game is not finished the value is NONE.
Usage
gameState
Format
An object of class list
of length 8.