Maze Generator

Python Recursive DFS 2D Lists Sets Nested Functions Stack

⚠ The original uses curses for real-time keys — browsers can't do that. This version is turn-based: type w/a/s/d then Enter to move. Same maze, same algorithm, just press Enter each step.

← Back to Games
maze_generator.py

// Press ▶ Run — find your way from S to E

›
DFSiterative stack-based
2D Listsgrid as list of lists
SetsO(1) visited lookup
Closuresnested neighbors()
Tuplesposition as (r, c)
Game loopstate + input + render