powered by
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.
maze2binary(m)
A maze object.
maze
A binary matrix where values of 1 denote paths through the maze and values of 0 denote the walls (impassable regions) of the maze.
# NOT RUN { m <- maze(10,10) m2 <- maze2binary(m) # }
Run the code above in your browser using DataLab