This assignment expands on problem 8.15 of Weiss. You are to write a program that generates mazes of arbitrary size inside a JPanel. In addition, the program should be able to find an optimal path through the maze. Some other features and functionalities are required.
As usual, you should include a README file that explains the program.
Write a program that allows the user to generate random mazes
using a GUI. The method for doing this is described in
section 8.7 of Weiss. Here are some features that you should
implement (THERE ARE SOME ADDITIONAL REQUIREMENTS ABOUT
THE WAY THE Disjoint-Sets DATA STRUCTURE SHOULD BE IMPLEMENTED. THESE
ARE SHOWN IN RED):
Solve the maze by finding the optimal path (no dead-ends) from the start-cell to the end-cell. When this path has been found, it should be drawn on the panel. The user should be able to click on a "Solve" button to start the solution phase of the program.
One way of doing this is by viewing the maze as a graph; moreover, cells are vertices which are connected to neighboring cells by an edge, whenever the wall between the cells has been knocked down. You can either create an explicit graph representation for the maze, or you can keep only the structures that you had for part 1, so that the edges are just "missing" interior walls. You can use the method described in class, or any other method that you come up with.
List any extra credit that you do in the README file and explain how your extra credit works.
If you do this part, please demo to Zeph.