Latest revision as of 14:04, 11 October 2019
This page is a solution to the task Maze generation in the Rosetta Code, written in Fōrmulæ.
Description (from Rosetta Code)
Generate and show a maze, using the simple Depth-first search algorithm.
- Start at a random cell.
- 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.