Pacman  1.0
Pacman game
Maze.h
Aller à la documentation de ce fichier.
1 #ifndef MAZE_H
2 #define MAZE_H
3 
4 #include "Gomme.h"
5 #include "Intersection.h"
6 #include "constants.h"
7 #include <memory>
8 #include <string>
9 #include <vector>
10 
17 struct Tile {
18  int x;
19  int y;
20 };
21 
29 class Maze {
30  public:
35  Maze();
36  ~Maze();
37  char getCell(int row, int col) const;
38  int getWidth() const;
39  int getHeight() const;
40  std::vector<std::shared_ptr<Intersection>> getIntersections() const;
41  std::shared_ptr<Intersection> getIntersection(int index) const;
42  std::vector<std::shared_ptr<Gomme>> getGommes() const;
43  void clearGomme(std::shared_ptr<Gomme> gomme);
44 
45  private:
46  std::vector<std::vector<int>> cells;
47  std::vector<std::shared_ptr<Intersection>> intersections;
48  std::vector<std::shared_ptr<Gomme>> gommes;
49  int width;
50  int height;
51 };
52 
53 #endif /* MAZE_H */
Maze class.
Definition: Maze.h:29
void clearGomme(std::shared_ptr< Gomme > gomme)
Definition: Maze.cpp:386
int getWidth() const
Definition: Maze.cpp:404
std::shared_ptr< Intersection > getIntersection(int index) const
Definition: Maze.cpp:397
std::vector< std::shared_ptr< Intersection > > getIntersections() const
Definition: Maze.cpp:395
int getHeight() const
Definition: Maze.cpp:406
std::vector< std::shared_ptr< Gomme > > gommes
Definition: Maze.h:48
std::vector< std::vector< int > > cells
Definition: Maze.h:46
~Maze()
Definition: Maze.cpp:375
int width
Definition: Maze.h:49
std::vector< std::shared_ptr< Intersection > > intersections
Definition: Maze.h:47
Maze()
Construct a new Maze object.
Definition: Maze.cpp:4
int height
Definition: Maze.h:50
char getCell(int row, int col) const
Definition: Maze.cpp:377
std::vector< std::shared_ptr< Gomme > > getGommes() const
Definition: Maze.cpp:384
Tile struct.
Definition: Maze.h:17
int y
Definition: Maze.h:19
int x
Definition: Maze.h:18