/maze-generator

🔎 Maze Generation: Recursive Backtracking

Primary LanguageJavaScriptMIT LicenseMIT

Welcome to Maze Generator 👋

Version License: MIT

Demo

  1. Choose a starting point in the field.
  2. Randomly choose a wall at that point and carve a passage through to the adjacent cell, but only if the adjacent cell has not been visited yet. This becomes the new current cell.
  3. If all adjacent cells have been visited, back up to the last cell that has uncarved walls and repeat.
  4. The algorithm ends when the process has backed all the way up to the starting point.

Author

👤 CHIHEB Milhane

License

Distributed under the 📜 MIT License. See LICENSE for more information.

Show your support

Give a ⭐️ if this project helped you!