Maze generation: Difference between revisions

Content added Content deleted
(Simplify and generalize: Keep direction properties)
(Import the actual algorithm description)
Line 2: Line 2:


Generate and show a maze, using using the simple [[wp:Maze_generation_algorithm#Depth-first_search|Depth-first search]] algorithm.
Generate and show a maze, using using the simple [[wp:Maze_generation_algorithm#Depth-first_search|Depth-first search]] algorithm.

<!-- BEGIN TEXT FROM WIKIPEDIA -->
#Start at a particular cell and call it the "exit."
#Mark the current cell as visited, and get a list of its neighbors. For each neighbor, starting with a randomly selected neighbor:
#:If that neighbor hasn't been visited, remove the wall between this cell and that neighbor, and then recurse with that neighbor as the current cell.
<!-- END TEXT FROM WIKIPEDIA -->


See also [[Maze solving]].
See also [[Maze solving]].