Created
September 13, 2013 22:17
-
-
Save sposterkil/6556815 to your computer and use it in GitHub Desktop.
Mouse instance named Despereaux, because literary references.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
else: | |
despereaux = Mouse(initial_cell) | |
done = False | |
visited_cells = [] | |
route = MazeRoute() | |
while (despereaux.can_travel() and | |
not despereaux.current_cell in visited_cells): | |
if despereaux.current_cell in self._cells: | |
visited_cells.append(despereaux.current_cell) | |
else: | |
route.add_cells([]) | |
return route | |
route.add_cells(visited_cells) | |
return route |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment