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