Provides classes which fill a simple maze using a variety of generating algorithms.
These generators accept plug-in strategies for storage (LIFO or FIFO) and a
plug-in geometry.
There are three filler algorithms.
- Simple fills the maze by generating a straight stretch and an intersection.
It simply gives up when it finds an edge or a crossing hall. Mazes tend to be sparse.
- Kinked fills the maze by generating a short straight stretch that may be punctuated by
non-intersection turns. It simply gives up when it finds an edge or a crossing hall.
Mazes tend to be sparsely filled, but reasonably twisty.
- Retry is a variation that backs up when an edge or a crossing hall is found.
Mazes tend to be well-packed.
The algorithm is parameterized with a branching factor. A 100% branching factor leads to
very short sections between intersections. A 0% branching factor leads to a boring
maze - more of a path.
A filler algorithm can also have a plug in storage mechanism.
- Depth-First uses a FIFO stack to finish a complete path before
doing another path.
- Breadth-First uses a LIFO queue to expand each path end "fairly".