

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Reset Visited
incomplete
2: Solve the Maze
incomplete
3: Submit Project
incomplete
This lesson's interactive features are locked, please to keep using them
It's finally time to solve the maze!
The solve() method on the Maze class simply calls the _solve_r method starting at i=0 and j=0. It should return True if the maze was solved, False otherwise. This is the same return value as _solve_r.
I wrote a depth-first solution to the maze, feel free to do something different if you want. Here were my steps.
The _solve_r method returns True if the current cell is an end cell, OR if it leads to the end cell. It returns False if the current cell is a loser cell.
Call maze.solve() in the main function and watch your algorithm do its work!