forked from SharifAIChallenge/AIC17-Client-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
85 lines (56 loc) · 1.61 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef GAME_H
#define GAME_H
#include <vector>
#include <utility>
#include <unordered_map>
#include "Cell.h"
#include "World.h"
#include "Event.h"
#include "EventHandler.h"
#include "Entity.h"
#include "Types.h"
#include "Map.h"
#include "Constants.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 turn;
int totalTurns;
long long turnStartTime;
std::pair<int, int> score;
int myID;
Map *map;
// EntityDict entities;
// EntityDict opp_entities;
Constants constants;
int turnTimeout;
void setConstants(Json::Value &msg);
// void insertEntity(Entity* entity);
//
// void deleteEntity(int id);
// void moveEntity(int id, int x, int y);
public:
Game();
virtual ~Game();
virtual void changeStrategy(bool wing, CellState left, CellState right, CellState front, Move strategy);
virtual void deterministicMove(Beetle &roach, Move strategy);
virtual void changeType(Beetle &roach, bool wing);
virtual int getCurrentTurn();
virtual int getTotalTurns();
virtual long long getTurnRemainingTime();
virtual long long getTurnTotalTime();
virtual int getTeamId();
virtual int getMyScore();
virtual int getOppScore();
Constants getConstants() const;
virtual Map* getMap();
long long getTurnTimePassed();
void handleInitMessage(Message &msg);
void handleTurnMessage(Message &msg);
};
#endif /* GAME_H */