source:
network-game/common/Game.h@
1d96513
Last change on this file since 1d96513 was 1d96513, checked in by , 11 years ago | |
---|---|
|
|
File size: 1.1 KB |
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" |
[1d96513] | 15 | #include "Projectile.h" |
[f419b09] | 16 | |
17 | using namespace std; | |
18 | ||
19 | class Game { | |
20 | private: | |
[b92e6a7] | 21 | unsigned int id; |
[c044a36] | 22 | string name; |
[b92e6a7] | 23 | map<unsigned int, Player*> players; |
[1d96513] | 24 | map<unsigned int, Projectile> projectiles; |
[b92e6a7] | 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(); |
[1d96513] | 38 | map<unsigned int, Projectile>& getProjectiles(); |
[b92e6a7] | 39 | int getBlueScore(); |
40 | int getRedScore(); | |
41 | WorldMap* getMap(); | |
[f419b09] | 42 | |
[b92e6a7] | 43 | void setId(unsigned int id); |
[1d96513] | 44 | void setBlueScore(int score); |
45 | void setRedScore(int score); | |
46 | ||
[f419b09] | 47 | bool addPlayer(Player* p); |
[b92e6a7] | 48 | bool removePlayer(unsigned int id); |
[0129700] | 49 | bool startPlayerMovement(unsigned int id, int x, int y); |
[402cf86] | 50 | bool processPlayerMovement(Player* p, FLOAT_POSITION oldPos); |
[ce2bb87] | 51 | int processFlagPickupRequest(Player* p); |
[402cf86] | 52 | |
[1d96513] | 53 | bool addProjectile(Projectile p); |
54 | bool removeProjectile(unsigned int id); | |
[f419b09] | 55 | }; |
56 | ||
57 | #endif |
Note:
See TracBrowser
for help on using the repository browser.