makeGraph: Create a connected maze graph that represents a rectangular...

Description Usage Arguments Value Examples

Description

Create a connected maze graph that represents a rectangular grid. Nodes represent cells and edges betweem nodes represent wall sites. All walls are initially on.

Usage

1
makeGraph(nrows = 0, ncols = 0)

Arguments

nrows

maze hight (number of rows); default value set to 0.

ncols

maze width (number of columns); default value set to 0.

Value

This function creates and returns a maze graph that represents a rectangular grid that matches user specified maze dimensions. Nodes in the graph will be named in the format Aij, where i corresponds to a row number and j corresponds to a column number.

Examples

1
2
3
maze1 <- makeGraph(10, 10)
maze1 <- makeMaze_dfs(maze1)
plotMaze(maze1, 10, 10)

Vessy/Rmaze documentation built on May 9, 2019, 9:54 p.m.