-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGame.h
67 lines (58 loc) · 1.4 KB
/
Game.h
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
#ifndef _GAME_H
#define _GAME_H
#include <vector>
#include "World.h"
#include "Event.h"
#include "EventHandler.h"
#include "Node.h"
/**
* Model contains data which describes current state of the game.
* You do not need to read this class, it's internal implementation.
* See World interface for more information.
* Do not change this class.
*/
class Game : public World
{
private:
int totalTurns;
long long turnTimeout;
long long turnStartTime;
int escape;
int nodeBonus;
int edgeBonus;
int firstlvl;
int secondlvl;
double lossRate1;
double lossRate2;
int myID;
int turn;
Graph* map;
std::vector<Node*> nodes[3];
void setConstants(Json::Value &msg);
public:
Game();
virtual ~Game();
void handleInitMessage(Message msg);
void handleTurnMessage(Message msg);
void updateNodesList();
int getTotalTurns();
long long getTurnTimePassed();
long long getTurnRemainingTime();
int getEscapeConstant();
int getNodeBonusConstant();
int getEdgeBonusConstant();
int getLowArmyBound();
int getMediumArmyBound();
double getMediumCasualtyCoefficient();
double getLowCasualtyCoefficient();
int getMyId();
Graph* getMap();
std::vector<Node*>& getMyNodes();
std::vector<Node*>& getOpponentNodes();
std::vector<Node*>& getFreeNodes();
int getTurnNumber();
long long getTotalTurnTime();
void moveArmy(Node* src, Node* dst, int count);
void moveArmy(int src, int dst, int count);
};
#endif // _GAME_H