Tic-Tac-Toe Package for R


[Up] [Top]

Documentation for package ‘rt3’ version 0.1.2

Help Pages

rt3-package rt3: A Package for Playing Tic-Tac-Toe in R.
EMPTY Constant for the empty square. It's value is the character "_".
firstAvailableMovePlayer Player that always takes the first move in the list of valid moves.
gameState The game state is represented by a list of 8 values.
getMoves Get the list of valid move from the game state.
makeMove Apply the move to the current game state an produce a new game state.
NONE Constant for no winner. It's value is the character "_".
O Constant for the O player.
playGame Play a game of Tic-Tac-Toe using the two provided stragies.
randomMovePlayer Player that picks a random move
rt3 rt3: A Package for Playing Tic-Tac-Toe in R.
startGame Start a new game
X Constant for the X player.