sraaphorst / spelunker

Maze generation and solving library
Other
11 stars 2 forks source link

T21: Added support to turn mazes into unicursal mazes. #37

Closed sraaphorst closed 6 years ago

sraaphorst commented 6 years ago

This change allows a Maze of width w and height h to produce a unicursal maze based on itself (by bisecting every passage and making dead ends into U-turns) of width 2w and height 2h.

Here is an example of a maze M generated by randomized DFS, and then a unicursal version of itself, M', and then a recursively generated unicursal version of that, M''.

screen shot 2018-05-26 at 3 57 31 pm