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!
Become a member to Complete
Become a member to view solution