08d49fbd26233741239270a091bf0ca1276f427b
MazeMaker
MazeMaker generates a random block maze and draws the maze in a PNG image. The maze is generated by creating a graph, with the array of blocks as nodes, and with edges between blocks that are adjacent either up, down, left, or right. Random weights are assigned to the edges, and Prim's algorithm finds the minimum spanning tree.
The result is a block maze where there are no cycles, every block in the array is accessible, and there is exactly one path from any one block to any other. The maze is drawn with openings at the lower left and upper right corner, suggesting a starting point and ending point.
Usage
mazemaker -w NUM_BLOCKS -h NUM_BLOCKS output.png
Description
2.1
Latest
Languages
C
92.6%
CMake
7.4%