new_board | R Documentation |
Create a Lights Out board that can be played by the user or solved automatically.
Only square boards of size 3x3, 5x5, 7x7, or 9x9 are supported. The initial
lights configuration must be provided. To create a board with a random
configuration, use the random_board
function.
new_board(entries, classic = TRUE)
entries |
The initial configuration of lights on the board. |
classic |
If |
A lightsout
board object.
random_board
play
solve_board
vector <- c(1, 1, 0,
1, 0, 1,
0, 1, 1)
new_board(entries = vector)
matrix <- matrix(
c(1, 1, 0,
1, 0, 1,
0, 1, 1),
nrow = 3, byrow = TRUE)
new_board(entries = matrix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.