Game 04
// Press ▶ Run — find your way from S to E
Concepts practiced
Reflection
I built a maze generator and solver using recursive depth-first search, representing the maze as a 2D grid of walls and paths stored in nested lists. I learned how a stack-based DFS can carve out a perfect maze by tracking visited cells in a set and backtracking when no unvisited neighbours remain. The trickiest debugging moment came when porting it to the browser; the original used Python's curses library for real-time key input, which Skulpt can't support. I worked around it by switching to a turn-based input model where the player types a direction and presses Enter, keeping the maze logic identical while making it fully playable in the browser terminal.