source:
network-game/common/Game.h@
ce2bb87
Last change on this file since ce2bb87 was ce2bb87, checked in by , 11 years ago | |
---|---|
|
|
File size: 943 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 | ||
[f419b09] | 13 | #include "Player.h" |
[b92e6a7] | 14 | #include "WorldMap.h" |
[f419b09] | 15 | |
16 | using namespace std; | |
17 | ||
18 | class Game { | |
19 | private: | |
[b92e6a7] | 20 | unsigned int id; |
[c044a36] | 21 | string name; |
[b92e6a7] | 22 | map<unsigned int, Player*> players; |
23 | WorldMap* worldMap; | |
24 | int blueScore; | |
25 | int redScore; | |
[f419b09] | 26 | |
27 | public: | |
28 | Game(); | |
[233e736] | 29 | Game(string name, string filepath); |
[f419b09] | 30 | |
31 | ~Game(); | |
32 | ||
[ab8fd40] | 33 | string getName(); |
[2ee386d] | 34 | int getNumPlayers(); |
[b92e6a7] | 35 | map<unsigned int, Player*>& getPlayers(); |
36 | int getBlueScore(); | |
37 | int getRedScore(); | |
38 | WorldMap* getMap(); | |
[f419b09] | 39 | |
[b92e6a7] | 40 | void setId(unsigned int id); |
[f419b09] | 41 | bool addPlayer(Player* p); |
[b92e6a7] | 42 | bool removePlayer(unsigned int id); |
[0129700] | 43 | bool startPlayerMovement(unsigned int id, int x, int y); |
[402cf86] | 44 | bool processPlayerMovement(Player* p, FLOAT_POSITION oldPos); |
[ce2bb87] | 45 | int processFlagPickupRequest(Player* p); |
[402cf86] | 46 | |
[b92e6a7] | 47 | void setBlueScore(int score); |
48 | void setRedScore(int score); | |
[f419b09] | 49 | }; |
50 | ||
51 | #endif |
Note:
See TracBrowser
for help on using the repository browser.