23.02.08
Maze Solver
Maze Solver is a program I wrote in Java. As its name implies, it can solve mazes. I have already written an extensive series of entries about the innerworkings of the program, so I won’t reiterate everything here. The entries are:
The basics of the program’s functioning was explained in the first entry:
- If the square to the left of the current square hasn’t been traveled, move to that square.
- Otherwise, if the square ahead of the current square hasn’t been traveled, move to that square
- Otherwise, if the square to the right of the current square hasn’t been traveled, move to that square
- Otherwise, if the square to the left of the current square has been traveled, move to that square.
- Otherwise, if the square to the right of the current square has been traveled, move to that square.
- Otherwise, if the square ahead of the current square has been traveled, move to that square.
- Finally, if none of the previous conditions were true, go back one step to the previous square.
Maze Methods
- Solve()
- PrintSolution()
- PrintMaze()
- Reset()
- ChangeSquare(int row, int col, int val)
- ChangeStart(int row, int col)
- ChangeFinish(int row, int col)
Screenshot

Download
The maze class as well as the GUI.




