Class MyMazeGenerator
java.lang.Object
mazealgo.model.algorithms.mazeGenerators.AMazeGenerator
mazealgo.model.algorithms.mazeGenerators.MyMazeGenerator
- All Implemented Interfaces:
IMazeGenerator
Iterative randomized DFS (recursive backtracker).
Cells live at even (row, column) positions. The grid starts as all walls,
then the algorithm walks from cell to cell knocking down the wall between
the current cell and a random unvisited neighbour, backtracking through
a stack when a cell has no unvisited neighbours left.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class mazealgo.model.algorithms.mazeGenerators.AMazeGenerator
measureAlgorithmTimeMillis, sanitize
-
Constructor Details
-
MyMazeGenerator
public MyMazeGenerator()
-
-
Method Details
-
generate
Description copied from interface:IMazeGeneratorGenerates a maze with the given number of rows and columns.- Specified by:
generatein interfaceIMazeGenerator- Specified by:
generatein classAMazeGenerator
-