mcmehene / Maze-Runner

a1-maze-runner-mcmehene created by GitHub Classroom
Other
0 stars 0 forks source link

West to East Path Traversal Class #23

Closed mcmehene closed 8 months ago

mcmehene commented 8 months ago

Get the west to east string and use it to navigate through the maze. Return true if the user path ends at the final tile after all of the instructions.

mcmehene commented 8 months ago

Begin at the first coordinate on the west wall, and then run the entire path of the user. If at any point the path moves out of bounds of the array or the current spot the explorer stands on is a wall (represented as #), the path is invalid. If the path moves through the maze with no violations, at the very end check to see if the final traversal coordinates equal the final tile coordinates. My class then returns a boolean sharing the answer to this question.