source: network-game/common/Game.h@ 0693e25

Last change on this file since 0693e25 was 0693e25, checked in by dportnoy <dmp1488@…>, 11 years ago

The client draws the map and players in individual games

  • Property mode set to 100644
File size: 948 bytes
Line 
1#ifndef _GAME_H
2#define _GAME_H
3
4#include "Compiler.h"
5
6#if defined WINDOWS
7 #include <winsock2.h>
8 #include <WS2tcpip.h>
9#elif defined LINUX
10 #include <netinet/in.h>
11#endif
12
13#include <string>
14#include <map>
15
16#include <allegro5/allegro_font.h>
17
18#include "Player.h"
19#include "WorldMap.h"
20
21using namespace std;
22
23class Game {
24private:
25 unsigned int id;
26 string name;
27 map<unsigned int, Player*> players;
28 WorldMap* worldMap;
29 int blueScore;
30 int redScore;
31
32public:
33 Game();
34 Game(string name, string filepath);
35
36 ~Game();
37
38 string getName();
39 int getNumPlayers();
40 map<unsigned int, Player*>& getPlayers();
41 int getBlueScore();
42 int getRedScore();
43 WorldMap* getMap();
44
45 void setId(unsigned int id);
46 bool addPlayer(Player* p);
47 bool removePlayer(unsigned int id);
48 void setBlueScore(int score);
49 void setRedScore(int score);
50
51 void drawPlayers(ALLEGRO_FONT* font, unsigned int curPlayerId);
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.