The objective of this assignment is:
This assignment uses the maze creation program you have created in a previous assignment and the graph code given in class to create and then solve mazes. The code for the graph class is available via links later in this document and on the server in the directory: ~dklick/examples/cis250/graph. You can use the graph class with only one small modification to the shortestPath function.
The first step will be to convert the maze you create into a graph. The cells will be the vertices of the graph, and the connections between the vertices/cells will be the edges of the graph. Once the maze is turned into graph data, you just ask the graph for the shortest route from the start cell to the finish cell.
Example: sprintf(buffer, formatString, variableList); char buf[100]; sprintf(buf, "%d squared is %d\n", 5, 5*5); // in: <cstdio> cout << buf << '\n';
$ ./msolve 10 10 All cells on board visited: true All boundaries correct: true All cells reachable: true _ _ _ _ _ _ _ _ _ | | | |_ | |_| |_ _|_ _|_ | | | | _| | | _| | | | _ _| | |_ _|_ _| | |_ | _| | _ _ _ | | | | |_ _ _| | | | | _|_ _ _ | | | | | |_ _ |_ |_ _| | | | | | | _| _ _| _| |_|_ _ _|_ _|_ _ _ | The shortest path from R00C00 to R09C09 is: R00C00 R00C01 R00C02 R01C02 R01C03 R00C03 R00C04 R01C04 R01C05 R00C05 R00C06 R01C06 R01C07 R02C07 R02C06 R03C06 R03C05 R02C05 R02C04 R03C04 R04C04 R05C04 R05C05 R04C05 R04C06 R04C07 R04C08 R04C09 R05C09 R06C09 R07C09 R08C09 R08C08 R09C08 R09C09