source:
network-game/common/Game.h@
6319311
Last change on this file since 6319311 was 6319311, checked in by , 11 years ago | |
---|---|
|
|
File size: 809 bytes |
Rev | Line | |
---|---|---|
[f419b09] | 1 | #ifndef _GAME_H |
2 | #define _GAME_H | |
3 | ||
4 | #include "Compiler.h" | |
5 | ||
6 | #include <string> | |
7 | #include <map> | |
8 | ||
[6319311] | 9 | #ifdef WINDOWS |
10 | #define WIN32_LEAN_AND_MEAN | |
11 | #endif | |
12 | ||
[0693e25] | 13 | #include <allegro5/allegro_font.h> |
14 | ||
[f419b09] | 15 | #include "Player.h" |
[b92e6a7] | 16 | #include "WorldMap.h" |
[f419b09] | 17 | |
18 | using namespace std; | |
19 | ||
20 | class Game { | |
21 | private: | |
[b92e6a7] | 22 | unsigned int id; |
[c044a36] | 23 | string name; |
[b92e6a7] | 24 | map<unsigned int, Player*> players; |
25 | WorldMap* worldMap; | |
26 | int blueScore; | |
27 | int redScore; | |
[f419b09] | 28 | |
29 | public: | |
30 | Game(); | |
[233e736] | 31 | Game(string name, string filepath); |
[f419b09] | 32 | |
33 | ~Game(); | |
34 | ||
[ab8fd40] | 35 | string getName(); |
[2ee386d] | 36 | int getNumPlayers(); |
[b92e6a7] | 37 | map<unsigned int, Player*>& getPlayers(); |
38 | int getBlueScore(); | |
39 | int getRedScore(); | |
40 | WorldMap* getMap(); | |
[f419b09] | 41 | |
[b92e6a7] | 42 | void setId(unsigned int id); |
[f419b09] | 43 | bool addPlayer(Player* p); |
[b92e6a7] | 44 | bool removePlayer(unsigned int id); |
45 | void setBlueScore(int score); | |
46 | void setRedScore(int score); | |
[f419b09] | 47 | }; |
48 | ||
49 | #endif |
Note:
See TracBrowser
for help on using the repository browser.