Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision 5066e27963c7c128fff0dae6cbec4a0eba72a13a)
+++ common/Player.cpp	(revision 03332115068088913b05df1b81e2290f90509823)
@@ -7,16 +7,35 @@
 using namespace std;
 
+Player::Player()
+{
+   this->id = 0;
+   this->name = "";
+   this->password = "";
+   this->pos.x = 0;
+   this->pos.y = 0;
+}
+
+Player::Player(const Player& p)
+{
+   this->id = p.id;
+   this->name = p.name;
+   this->password = p.password;
+   this->pos.x = p.pos.x;
+   this->pos.y = p.pos.y;
+   this->addr = p.addr;
+}
+
 Player::Player(string name, string password)
 {
+   this->id = 0;
    this->name = name;
    this->password = password;
    this->pos.x = 200;
    this->pos.y = 200;
-
-   cout << "Created new player: " << this->name << endl;
 }
 
 Player::Player(string name, sockaddr_in addr)
 {
+   this->id = 0;
    this->name = name;
    this->password = "";
@@ -24,6 +43,4 @@
    this->pos.y = 200;
    this->addr = addr;
-
-   cout << "Created new played: " << this->name << endl;
 }
 
@@ -36,4 +53,5 @@
    ostringstream oss;
 
+   oss.write((char*)&(this->id), sizeof(int));
    oss << this->name;
    oss.write("\0", 1);
@@ -49,7 +67,13 @@
    iss.str(buffer);
 
+   iss.read((char*)&(this->id), sizeof(int));
    iss >> this->name;
    iss.read((char*)&(this->pos.x), sizeof(int));
    iss.read((char*)&(this->pos.y), sizeof(int));
+}
+
+void Player::setId(int id)
+{
+   this->id = id;
 }
 
Index: common/Player.h
===================================================================
--- common/Player.h	(revision 5066e27963c7c128fff0dae6cbec4a0eba72a13a)
+++ common/Player.h	(revision 03332115068088913b05df1b81e2290f90509823)
@@ -19,6 +19,9 @@
 class Player {
 public:
+   Player();
+   Player(const Player& p);
    Player(string name, string password);
    Player(string name, sockaddr_in addr); // this will be deleted
+
    ~Player();
 
@@ -26,6 +29,8 @@
    void deserialize(char* buffer);
 
+   void setId(int id);
    void setAddr(sockaddr_in addr);
 
+   int id;
    string name;
    string password;
