Skip to content
Generates mazes
JavaScript HTML CSS
Branch: master
Clone or download
Latest commit 4110559 Mar 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Update README.md Mar 8, 2019
index.html Initial commit Mar 8, 2019
index.js Initial commit Mar 8, 2019
main.css

README.md

Maze Generator

  • Control using the sliders and then generate!

Algorithm

Recursive Backtracking

  • Make the initial cell the current cell and mark it as visited
  • While there are unvisited cells
    • If the current cell has any neighbours which have not been visited
      • Choose randomly one of the unvisited neighbours
      • Push the current cell to the stack
      • Remove the wall between the current cell and the chosen cell
      • Make the chosen cell the current cell and mark it as visited
    • Else if stack is not empty
      • Pop a cell from the stack
      • Make it the current cell
You can’t perform that action at this time.