randomMovePlayer {rt3} | R Documentation |
Internally this player calls getMoves and then picks an entry in the list of moves at random.
A player is a function that takes a game state as input and returns a valid move index.
randomMovePlayer(gameState)
gameState |
The gameState that the player should act on. |
moveIndex Index to a valid move as returned by the getMoves function.
gameState <- startGame()
move <- randomMovePlayer(gameState)