Index: client/Client/GameRender.cpp
===================================================================
--- client/Client/GameRender.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ client/Client/GameRender.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -52,63 +52,4 @@
          }
       }
-   }
-}
-
-void GameRender::drawPlayers(map<unsigned int, Player>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId)
-{
-   map<unsigned int, Player>::iterator it;
-
-   Player* p;
-   POSITION pos;
-   ALLEGRO_COLOR color;
-
-   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
-   {
-      p = &it->second;
-
-      if (p->isDead)
-         continue;
-
-      pos = mapToScreen(p->pos.toInt());
-
-      if (p->id == curPlayerId)
-         al_draw_filled_circle(pos.x, pos.y, 14, al_map_rgb(0, 0, 0));
-      
-      if (p->team == 0)
-         color = al_map_rgb(0, 0, 255);
-      else if (p->team == 1)
-         color = al_map_rgb(255, 0, 0);
-      
-      al_draw_filled_circle(pos.x, pos.y, 12, color);
-
-      // draw player class
-      int fontHeight = al_get_font_line_height(font);
-
-      string strClass;
-      switch (p->playerClass) {
-      case Player::CLASS_WARRIOR:
-         strClass = "W";
-         break;
-      case Player::CLASS_RANGER:
-         strClass = "R";
-         break;
-      case Player::CLASS_NONE:
-         strClass = "";
-         break;
-      default:
-         strClass = "";
-         break;
-      }
-      al_draw_text(font, al_map_rgb(0, 0, 0), pos.x, pos.y-fontHeight/2, ALLEGRO_ALIGN_CENTRE, strClass.c_str());
-
-      // draw player health
-      al_draw_filled_rectangle(pos.x-12, pos.y-24, pos.x+12, pos.y-16, al_map_rgb(0, 0, 0));
-      if (p->maxHealth != 0)
-         al_draw_filled_rectangle(pos.x-11, pos.y-23, pos.x-11+(22*p->health)/p->maxHealth, pos.y-17, al_map_rgb(255, 0, 0));
-
-      if (p->hasBlueFlag)
-         al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(0, 0, 255));
-      else if (p->hasRedFlag)
-         al_draw_filled_rectangle(pos.x+4, pos.y-18, pos.x+18, pos.y-4, al_map_rgb(255, 0, 0));
    }
 }
Index: client/Client/GameRender.h
===================================================================
--- client/Client/GameRender.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ client/Client/GameRender.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -24,5 +24,4 @@
 public:
    static void drawMap(WorldMap* gameMap);
-   static void drawPlayers(map<unsigned int, Player>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId);
    static void drawPlayers(map<unsigned int, Player*>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId);
 };
Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ client/Client/main.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -54,5 +54,5 @@
 void initWinSock();
 void shutdownWinSock();
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed);
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed);
 int getRefreshRate(int width, int height);
 void drawMessageStatus(ALLEGRO_FONT* font);
@@ -133,5 +133,5 @@
    ALLEGRO_TIMER *timer = NULL;
    bool key[4] = { false, false, false, false };
-   map<unsigned int, Player> mapPlayers;
+   map<unsigned int, Player*> mapPlayers;
    map<unsigned int, Projectile> mapProjectiles;
    unsigned int curPlayerId = -1;
@@ -362,10 +362,10 @@
                if (state == STATE_GAME) {
                   // find the current player in the player list
-                  map<unsigned int, Player>::iterator it;
+                  map<unsigned int, Player*>::iterator it;
                   Player* p = NULL;
                   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
                   {
-                     if (it->second.id == curPlayerId)
-                        p = &it->second;
+                     if (it->second->id == curPlayerId)
+                        p = it->second;
                   }
 
@@ -416,5 +416,5 @@
                   cout << "Invalid point: User did not click on the map" << endl;
             }else if (ev.mouse.button == 2) {   // right click
-                  map<unsigned int, Player>::iterator it;
+                  map<unsigned int, Player*>::iterator it;
 
                   cout << "Detected a right-click" << endl;
@@ -423,6 +423,6 @@
                   for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
                   {
-                     if (it->second.id == curPlayerId)
-                        curPlayer = &it->second;
+                     if (it->second->id == curPlayerId)
+                        curPlayer = it->second;
                   }
 
@@ -432,5 +432,5 @@
                      // need to check if the right-click was actually on this player
                      // right now, this code will target all players other than the current one
-                     target = &it->second;
+                     target = it->second;
                      if (target->id != curPlayerId && target->team != curPlayer->team)
                      {
@@ -502,13 +502,13 @@
 
             // update players
-            map<unsigned int, Player>::iterator it;
+            map<unsigned int, Player*>::iterator it;
             for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
             {
-               it->second.updateTarget(mapPlayers);
+               it->second->updateTarget(mapPlayers);
             }
 
             for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
             {
-               it->second.move(gameMap);   // ignore return value
+               it->second->move(gameMap);    // ignore return value
             }
 
@@ -528,5 +528,5 @@
                Projectile proj = it2->second;
 
-               FLOAT_POSITION target = mapPlayers[proj.target].pos;
+               FLOAT_POSITION target = mapPlayers[proj.target]->pos;
                float angle =  atan2(target.y-proj.pos.toFloat().y, target.x-proj.pos.toFloat().x);
 
@@ -572,4 +572,10 @@
       delete game;
 
+   map<unsigned int, Player*>::iterator it;
+
+   for (it = mapPlayers.begin(); it != mapPlayers.end(); it++) {
+      delete it->second;
+   }
+
    al_destroy_event_queue(event_queue);
    al_destroy_display(display);
@@ -617,5 +623,5 @@
 }
 
-void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed)
+void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, WorldMap *gameMap, map<unsigned int, Player*>& mapPlayers, map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed)
 {
    string response = string(msg.buffer);
@@ -671,5 +677,8 @@
                   Player p("", "");
                   p.deserialize(msg.buffer);
-                  mapPlayers[p.id] = p;
+
+                  if (mapPlayers.find(p.id) != mapPlayers.end())
+                     delete mapPlayers[p.id];
+                  mapPlayers[p.id] = new Player(p);
                   curPlayerId = p.id;
 
@@ -708,5 +717,7 @@
                   p.isDead = false;
 
-               mapPlayers[p.id] = p;
+               if (mapPlayers.find(p.id) != mapPlayers.end())
+                    delete mapPlayers[p.id];
+               mapPlayers[p.id] = new Player(p);
 
                break;
@@ -721,6 +732,6 @@
                memcpy(&y, msg.buffer+8, 4);
 
-               mapPlayers[id].target.x = x;
-               mapPlayers[id].target.y = y;
+               mapPlayers[id]->target.x = x;
+               mapPlayers[id]->target.y = y;
 
                break;
@@ -781,5 +792,5 @@
                cout << "target id: " << targetID << endl;
 
-               Player* source = &mapPlayers[id];
+               Player* source = mapPlayers[id];
                source->targetPlayer = targetID;
                source->isChasing = true;
Index: common/Common.h
===================================================================
--- common/Common.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/Common.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -1,14 +1,4 @@
 #ifndef _COMMON_H
 #define _COMMON_H
-
-#include "Compiler.h"
-
-#if defined WINDOWS
-   #include <winsock2.h>
-   #include <ws2tcpip.h>
-#elif defined LINUX
-   #include <fcntl.h>
-   #include <assert.h>
-#endif
 
 #include <string>
Index: common/MessageContainer.h
===================================================================
--- common/MessageContainer.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/MessageContainer.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -4,7 +4,9 @@
 #include <string>
 
-#include "Common.h"
+#include "Compiler.h"
 
-#if defined LINUX
+#if defined WINDOWS
+   #include <winsock2.h>
+#elif defined LINUX
    #include <netinet/in.h>
 #endif
Index: common/MessageProcessor.cpp
===================================================================
--- common/MessageProcessor.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/MessageProcessor.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -3,4 +3,12 @@
 #include <iostream>
 #include <fstream>
+
+#include "Compiler.h"
+
+#if defined WINDOWS
+   #include <ws2tcpip.h>
+#endif
+
+#include "Common.h"
 
 MessageProcessor::MessageProcessor() {
Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/Player.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -206,8 +206,8 @@
 }
 
-bool Player::updateTarget(map<unsigned int, Player>& mapPlayers) {
+bool Player::updateTarget(map<unsigned int, Player*>& mapPlayers) {
    if (this->isChasing) {
-      this->target.x = mapPlayers[this->targetPlayer].pos.x;
-      this->target.y = mapPlayers[this->targetPlayer].pos.y;
+      this->target.x = mapPlayers[this->targetPlayer]->pos.x;
+      this->target.y = mapPlayers[this->targetPlayer]->pos.y;
 
       if (posDistance(this->pos, this->target.toFloat()) <= this->range) {
Index: common/Player.h
===================================================================
--- common/Player.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/Player.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -5,7 +5,9 @@
 #include <map>
 
-#include "Common.h"
+#include "Compiler.h"
 
-#if defined LINUX
+#if defined WINDOWS
+   #include <winsock2.h>
+#elif defined LINUX
    #include <netinet/in.h>
 #endif
@@ -46,5 +48,5 @@
    void deserialize(char* buffer);
 
-   bool updateTarget(map<unsigned int, Player>& mapPlayers);
+   bool updateTarget(map<unsigned int, Player*>& mapPlayers);
    bool move(WorldMap *map);
 
Index: common/Projectile.cpp
===================================================================
--- common/Projectile.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/Projectile.cpp	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -71,10 +71,10 @@
 }
 
-bool Projectile::move(map<unsigned int, Player>& mapPlayers) {
+bool Projectile::move(map<unsigned int, Player*>& mapPlayers) {
    // if the current target logs off, this method will run into problems
 
    unsigned long long curTime = getCurrentMillis();
 
-   Player targetP = mapPlayers[target];
+   Player* targetP = mapPlayers[target];
 
    if (timeLastUpdated == 0) {
@@ -85,10 +85,10 @@
 
    float pixels = speed * (curTime-timeLastUpdated) / 1000.0;
-   double angle = atan2(targetP.pos.y-pos.y, targetP.pos.x-pos.x);
-   float dist = sqrt(pow(targetP.pos.x-pos.x, 2) + pow(targetP.pos.y-pos.y, 2));
+   double angle = atan2(targetP->pos.y-pos.y, targetP->pos.x-pos.x);
+   float dist = sqrt(pow(targetP->pos.x-pos.x, 2) + pow(targetP->pos.y-pos.y, 2));
 
    if (dist <= pixels) {
-      pos.x = targetP.pos.x;
-      pos.y = targetP.pos.y;
+      pos.x = targetP->pos.x;
+      pos.y = targetP->pos.y;
       return true;
    }else {
Index: common/Projectile.h
===================================================================
--- common/Projectile.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ common/Projectile.h	(revision e6c26b8e97335601a55a8fba77c10c05b3b08c98)
@@ -26,5 +26,10 @@
 
    // returns true if it reached the target and should be deleted
-   bool move(map<unsigned int, Player>& mapPlayers);
+   bool move(map<unsigned int, Player*>& mapPlayers);
+
+   /*
+    * target should become a Player*. When this object gets serialized, the player's id should be sent.
+    * Deserialization in this case might be tricky since it will require a playerMap to turn the id into a Plauyer*
+    */
 
    int id;
