is_solved | R Documentation |
A board is considered solved if all the lights are switched off (have a state of 0
).
is_solved(board)
board |
A |
TRUE
if the given board is solved; FALSE
otherwise.
is_solvable
solve_board
# Create a board solved with one move and solve it.
lights <- c(1, 1, 0,
1, 0, 0,
0, 0, 0 )
board <- new_board(lights)
is_solved(board)
board <- board %>% play(1, 1)
is_solved(board)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.