Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Maze Generation: Recursive Backtracking (jamisbuck.org)
4 points by llambda on June 2, 2012 | hide | past | favorite | 1 comment


I wanted to comment on the blog but the comment link seems broken.

This is basically the algorithm I use however instead of using a recursive call I have a variable that keeps track of the current position. When I run in to a dead end and need to backtrack I mark the cell with a special backtrack flag and find the only neighboring cell that I can move back to that does not have the backtrack flag.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: