Description Usage Arguments Value Examples
Pit two players in a game of c4!
1 |
player1 |
Either an instance of a reference class or a reference class generator |
player2 |
Either an instance of a reference class or a reference class generator |
nrow |
Number of rows for the board |
ncol |
Number of columns for the board |
firstplayer |
numeric. 1 or 2, which player goes first? |
The game winner number. 1 or 2.
1 2 3 4 5 6 7 8 9 10 11 12 | c4arena(randomPlayer, randomPlayer)
p1 <- randomPlayer$new()
p2 <- randomPlayer$new()
c4arena(p1, p2)
## Not run:
p1 <- randomPlayer$new(name = "Bob")
p2 <- human$new(name = "Alice")
c4arena(p1, p2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.