source: network-game/common/Game.h@ 321fbbc

Last change on this file since 321fbbc was 321fbbc, checked in by Dmitry Portnoy <dportnoy@…>, 11 years ago

Client only stores the game name and number of players of each game

  • Property mode set to 100644
File size: 512 bytes
RevLine 
[f419b09]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 "Player.h"
17
18using namespace std;
19
20class Game {
21private:
22 int id;
[c044a36]23 string name;
[f419b09]24 map<int, Player*> players;
25
26public:
27 Game();
28 Game(string name);
29
30 ~Game();
31
[2ee386d]32 int getNumPlayers();
[f419b09]33
[2ee386d]34 void setId(int id);
[f419b09]35 bool addPlayer(Player* p);
36 bool removePlayer(int id);
37};
38
39#endif
Note: See TracBrowser for help on using the repository browser.