Rally X
ELEN3009 Project by Justin Wernick and David Schneider
|
00001 #ifndef MAZE_H 00002 #define MAZE_H 00003 00004 #include <vector> 00005 #include <utility> 00006 using namespace std; 00007 00014 class Maze 00015 { 00016 public: 00020 enum Direction {UP, DOWN, LEFT, RIGHT}; 00021 00025 Maze(); 00026 00027 //assignment and copy constructors have been left with the compiler generated versions 00028 00040 void generateMaze(const vector<pair<int,int> >& walls, int maxObjectX=0, int maxObjectY=0); 00041 00057 bool getSolid(const int& x, const int& y) const; 00058 00064 int width() const; 00070 int height() const; 00071 00079 static Direction backwards(Direction forwards); 00080 00081 private: 00085 typedef vector<vector<bool> > BoolGrid; 00086 00094 BoolGrid _wallLocations; 00095 00096 int _width; 00097 int _height; 00098 }; 00099 00100 #endif // MAZE_H