I\'ve been assigned with the task of creating a maze solver in Java. Here\'s the assignment:
Write an application that finds a path through a maze.
The maze sh
You probably should module your program - as I can understand it, you are reading the maze from file and trying to solve it at the same time.
A better approach will be to split the program into 2 distinct parts:
Doing so will help you to build and test each part seperately, which will probably result in better, more reliable program.
Solving the maze could be done by a simple BFS, which is similar to what your algorithm originally suggested , which is a DFS