diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/game.cpp | 4 | ||||
-rw-r--r-- | server/game.h | 15 | ||||
-rw-r--r-- | server/player.cpp | 10 | ||||
-rw-r--r-- | server/player.h | 21 |
4 files changed, 50 insertions, 0 deletions
diff --git a/server/game.cpp b/server/game.cpp new file mode 100644 index 0000000..36fd33c --- /dev/null +++ b/server/game.cpp @@ -0,0 +1,4 @@ +#include "game.h" + +Game::Game(){} +Game::~Game(){} diff --git a/server/game.h b/server/game.h new file mode 100644 index 0000000..1cb03c1 --- /dev/null +++ b/server/game.h @@ -0,0 +1,15 @@ +#ifndef GAME_H
+#define GAME_H
+ +#include <list> +#include "player.h" +
+class Game{ + private: + std::list<Player> players; + public: + Game(); + ~Game(); +};
+
+#endif // GAME_H
diff --git a/server/player.cpp b/server/player.cpp new file mode 100644 index 0000000..9530c10 --- /dev/null +++ b/server/player.cpp @@ -0,0 +1,10 @@ +#include "player.h" + +Player::Player(){} +Player::~Player(){} + +Player::Player(std::string& ip, std::string& port, std::string& nick){ + this->ip = ip; + this->port = port; + this->nick = nick; +} diff --git a/server/player.h b/server/player.h new file mode 100644 index 0000000..c2cecdf --- /dev/null +++ b/server/player.h @@ -0,0 +1,21 @@ +#ifndef PLAYER_H
+#define PLAYER_H + +#include <string>
+
+class Player{ + private: + //What the server needs to get in contact with player. + std::string ip; + std::string port; + std::string nick;//The players nick + + unsigned int id;//Either generated or fetched from database + public: + Player(); + ~Player(); + + Player(std::string& ip, std::string& port, std::string& nick); +};
+
+#endif // PLAYER_H_INCLUDED
|