Simple2012

Marcus_Maze_Generation.h

May 27th, 2013
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. #ifndef MAZEH
  2. #define MAZEH
  3. #include <vector>
  4. #include <utility>  // std::pair
  5.  
  6. class Maze{
  7. public:
  8.     static const char WALL, PATH, END, START, VISITED;
  9.     static const unsigned int SIZE;
  10.     void Create_maze(unsigned int row, unsigned int col);
  11.     void Generate_maze(std::pair<unsigned int, unsigned int> CurrentCell);
  12.     bool Walls_Intact(std::pair<unsigned int, unsigned int> CurrentCell);
  13.  
  14.     std::vector< std::pair<unsigned int, unsigned int> > Find_neighbours(std::pair<unsigned int, unsigned int> CurrentCell);
  15.     std::vector<unsigned int> Check_direction(unsigned int x, unsigned int y, std::vector<std::pair <unsigned int, unsigned int> > v);
  16.     char setPosition(int x, int y, char val);
  17.     void Print_maze() const;
  18.     std::vector< std::pair<unsigned int, unsigned int> > NeighboursToVisit;
  19. private:
  20.     void Crush_wall(std::pair<unsigned int, unsigned int> CurrentCell, int dir);
  21.     std::vector< std::vector<char> > Map;
  22. };
  23.  
  24. #endif
  25. /* MAZE.H */
Advertisement
Add Comment
Please, Sign In to add comment