Description Usage Arguments Details Value See Also Examples
This method updates a msweepeR board by opening a tile or by placing a flag on it. If the opened tile contains a mine, the game it's over.
1 | change.msBoard(x, action, row, col, warnings = TRUE)
|
x |
A msweepeR board (an R object of class |
action |
A character vector of length 1. Valid options are: |
row |
Row number of the desired tile to interact with. Must be a positive integer. Each tile in the game board has a [row, col] coordinate, ike any other matrix like object in R. |
col |
Column number of the desired tile to interact with. Must be a positive integer. Each tile in the game board has a [row, col] coordinate, like any other matrix like object in R. |
warnings |
Logical vector of length 1. Indicates whether warnings are enabled. |
This method is called with the S3 method play.msweepeR
, and it's recommended that
it's only called through such method.
This method returns the updated msweepeR board (an R object of class msBoard
).
1 2 | x <- msBoard()
x <- change.msBoard(x, "open", 1, 1, FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.