Description Usage Arguments Value Examples
View source: R/helper_functions.R
A function to convert a maze object into a binary matrix. This can be useful for visualization (as when plotting the walls of the maze) and for constructing complex mazes, such as a maze-within-a-maze.
1 | maze2binary(m)
|
m |
A |
A binary matrix where values of 1 denote paths through the maze and values of 0 denote the walls (impassable regions) of the maze.
1 2 | m <- maze(10,10)
m2 <- maze2binary(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.