MazeGenerator
Module that implements a depth-first method that generates a perfect maze. A partfect maze is
one with exactly one path between any two locations in the maze. The maze is randomly generated.
use -z# at the command line with different numbers for # to get different mazes each time.
Example XML definition
A simple example
<module class = "MazeGenerator" name = "MazeGenerator" height = "2" width = "2" />
Parameters
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "MazeGenerator". | string | |
name | The name of this instance of the module. | string | |
size | The size of the maze. The actual matrix width and height will depend on the type of maze | int | 8 |
type | The size of the maze. The actual matrix width and height will depend on the type of maze | choices: perfect l-maze t-maze | 0 |
regenerate | When to regenerate the maze in ticks (0 = never) | int | 0 |
Module Connections
Outputs
Name | Description |
---|---|
OUTPUT | The generated maze |
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
MazeGenerator.h
MazeGenerator.cc
MazeGenerator.ikc