-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameModel.h
More file actions
88 lines (60 loc) · 1.52 KB
/
GameModel.h
File metadata and controls
88 lines (60 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef GAMEMODEL_H
#define GAMEMODEL_H
#include "EDirection.h"
#include "IGameModel.h"
#include "IRuleFetcher.h"
#include "PathMissile.h"
#include "TypeDefEngine.h"
/**
* @brief This class holds all information about the game.
*/
class GameModel : public IGameModel
{
private:
IRuleFetcher* m_ruleFetcher;
/**
* @brief This is the member for the current direction.
*/
DIRECTION m_direction;
/**
* @brief This is the member for the current position;
*/
int m_position;
int m_grid_dimension;
int m_vitesse;
std::string m_domain;
std::string m_missileDomain;
std::vector<PathMissilePtr> m_pathMissileList;
void updateMissilePosition();
void nextMissilePosition(PathMissilePtr a_missilePtr);
public:
/**
* @brief Constructor
*
* @param m_direction Initial direction.
* @param m_position Initial position.
* @param m_grid_dimension Grid dimension
* @param m_missileDomain Missile Domain
*/
GameModel(DIRECTION a_direction,
int a_position,
int a_grid_dimension,
std::string a_domain,
std::string a_missileDomain);
/**
* @brief This method returns the next position index.
*
* @return Next position index
*/
int nextPosition();
void changeDirection(DIRECTION direction);
void changePosition(int position);
void changeVitesse(int vitesse);
DIRECTION getDirection();
int getPosition();
std::string getDomain();
std::string getMissileDomain();
void lanceMissile();
std::vector <PathMissilePtr > GetPathMissileList();
};
#endif