Hacker News new | past | comments | ask | show | jobs | submit login

My favorite maze generation algorithm was the really simple one where you have a cursor, you push your coordinates to the stack, then remove a wall to a random unvisited square that's adjacent to the cursor. When you run out of possible choices for an unvisited square, you pop coordinates from the stack. Mazes generated by this algorithm tend be easy to solve, with long paths and short dead ends.





Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: