0.5.3 • Published 6 years ago

@ludw1gj/canvas-grid v0.5.3

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

Maze Generation

Recursive Backtracking

  1. Make the initial cell the current cell and mark it as visited.
  2. While there are unvisited cells:
    1. If the current cell has any neighbours which have not been visited
      1. Choose randomly one of the unvisited neighbours
      2. Push the current cell to the stack
      3. Remove the wall between the current cell and the chosen cell
      4. Make the chosen cell the current cell and mark it as visited
    2. Else if stack is not empty
      1. Pop a cell from the stack
      2. Make it the current cell
0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago