Description Usage Arguments Value Examples
Main game
1 | tic.tac.toe(ttt, player1 = "human", player2 = "computer")
|
ttt: |
data.tree: the full list of moves for every game. |
player1: |
String: the optional name of player1. |
player2: |
String: the optional name of player2. |
game: |
vector of length 9 |
ttt: |
data.tree: the full list of moves for every game. |
player1: |
String: the optional name of player1. |
player2: |
String: the optional name of player2. |
node: |
data.tree: the full list of moves for every game. |
label: |
String: the optional description of which node this represents |
an integer: 0: no one has one 1: player 1 has won -1: player -1 has won
an integer: 0: no one has one 1: player 1 has won -1: player -1 has won
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ttt <- TTTTree()
tic.tac.toe(ttt)
Draw the game board - using plots
ttt <- TTTTree()
draw.board(rep(1:9))
Main game
ttt <- TTTTree()
tic.tac.toe(ttt)
print a node in the tree.
PrintNode(node)
tic.tac.toe(ttt, label='child')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.