maze2binary: Convert maze to binary matrix

Description Usage Arguments Value Examples

View source: R/helper_functions.R

Description

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.

Usage

1

Arguments

m

A maze object.

Value

A binary matrix where values of 1 denote paths through the maze and values of 0 denote the walls (impassable regions) of the maze.

Examples

1
2
m <- maze(10,10)
m2 <- maze2binary(m)

mazing documentation built on Oct. 6, 2021, 1:09 a.m.