SquareMaze
The SquareMaze class should be declared and defined in maze.h and maze.cpp, respectively. Each SquareMaze object will represent a randomly-generated square maze and its solution. Note that by "square maze" we mean a maze in which each cell is a square; the maze itself need not be a square. We recommend reading the whole specification before starting.
Warning: setWall and canTravel
You should triple check that setWall and canTravel function exactly according to spec, as an error in these functions will not be caught by making your own mazes but can cost you a majority of the points during grading.
The makeMaze function
See the doxygen.
The canTravel function
See the doxygen.
The setWall function
See the doxygen.
The solveMaze function
See the doxygen.
The drawMaze function
See the doxygen.
The drawMazeWithSolution function
See the doxygen.
Testing
Since your mazes will be randomly generated, we cannot provide you with any sample images to diff against. However, we have provided you with all four possible 2x2 mazes. If you have your program create and solve a 2x2 maze, the resulting image (with solution) should match one (and only one) of the provided images m0.png, m1.png, m2.png, and m3.png. We strongly suggest that you diff against these to make sure that you have formatted the output image correctly.
We provide some basic code to test the functionality of SquareMaze.
The following command can be used to compile the SquareMaze test executable:
make testsquaremaze
The following command can be used to run the test executable:
./testsquaremaze