You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for all your suggestions and contributions! Yes, initially I didn't think of including more algorithms so I just had everything maze stuff in the Maze class, but yes, creating a solver class might definitely be a good way to go. Also the wall follower algorithm sounds like a good addition.
It would be very nice to support the wall follower algorithm. We can go about this a couple of different ways.
Add another solve method.
We would rename
def solve_maze
to something likedef solve_recursive_back
and then add a new method,def solve_wall_follower
.Pros:
It keeps the code simple
Quick
Few auxiliary changes (for example, we may need to refactor def
_validate_neighbors_solve
Cons
In the long run, the code may get incredibly unstructured if we support more.
Create a
solver
ClassCreate a base class that represents a solution method.
For example,
We could always create an interface to it at a later time so that users don't need to mess around with class instantiation.
Pros:
Better long term support
Cons:
Adds complexity
Not as easy to use?
Options:
The text was updated successfully, but these errors were encountered: