Skip to content

roma0615/maze_generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Maze Generation

An implementation of Kruskal's algorithm to generate a maze.

Initially, there are walls surrounding each cell. Then, each wall is visited in a random order. The wall is removed if it separates two cells that are otherwise disjoint. By the end, all cells will be connected—i.e. it will possible to get from any cell to any other cell—and due to the random nature of how the walls are removed, a maze will have been generated.

Try it here!