Assignment was split into two separate problems
- Create a program that uses a Depth First Search to develop a maze, and output to a text file in a format specified as follows
width,height:start_node:end_node:cell_openness_list
, wherecell_openness_list
describes the state of the right and bottom walls of a cell and hold the values
0: Both closed
1: Right only open
2: Down only open
3: both open
- Create a program that uses a Depth First Search to solve a maze, given an input file generated from the program described above
javac MazeGenerator.java
javac MazeSolverDFS.java
java MazeGenerator <width> <height> <filename>
withfilename
as an output filejava MazeSolverDFS <filename> [showBacktracking:true]
wherefilename
refers to a file generated from the previous step andshowBacktracking
is an optional boolean to indicate whether the solution should include any backtracking as it discovered the solution