Index: client/Client/Button.cpp
===================================================================
--- client/Client/Button.cpp	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/Button.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -1,3 +1,5 @@
 #include "Button.h"
+
+#include "../../common/Compiler.h"
 
 Button::Button(int x, int y, int width, int height, ALLEGRO_FONT *font, string str, void (*callback)()) :
Index: client/Client/Client.vcxproj
===================================================================
--- client/Client/Client.vcxproj	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/Client.vcxproj	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -76,4 +76,5 @@
     <ClCompile Include="chat.cpp" />
     <ClCompile Include="Button.cpp" />
+    <ClCompile Include="GameRender.cpp" />
     <ClCompile Include="GuiComponent.cpp" />
     <ClCompile Include="main.cpp" />
@@ -94,4 +95,5 @@
     <ClInclude Include="chat.h" />
     <ClInclude Include="Button.h" />
+    <ClInclude Include="GameRender.h" />
     <ClInclude Include="GuiComponent.h" />
     <ClInclude Include="RadioButtonList.h" />
Index: client/Client/Client.vcxproj.filters
===================================================================
--- client/Client/Client.vcxproj.filters	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/Client.vcxproj.filters	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -73,4 +73,7 @@
       <Filter>Source Files\common</Filter>
     </ClCompile>
+    <ClCompile Include="GameRender.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
@@ -120,4 +123,7 @@
       <Filter>Header Files\common</Filter>
     </ClInclude>
+    <ClInclude Include="GameRender.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
Index: client/Client/GameRender.cpp
===================================================================
--- client/Client/GameRender.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
+++ client/Client/GameRender.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -0,0 +1,173 @@
+#include "GameRender.h"
+
+#include <allegro5/allegro_primitives.h>
+
+void GameRender::drawMap(WorldMap* gameMap)
+{
+   POSITION mapPos;
+   mapPos.x = 0;
+   mapPos.y = 0;
+   mapPos = mapToScreen(mapPos);
+
+   for (int x=0; x<gameMap->width; x++)
+   {
+      for (int y=0; y<gameMap->height; y++)
+      {
+         WorldMap::TerrainType el = gameMap->getElement(x, y);
+         WorldMap::StructureType structure = gameMap->getStructure(x, y);
+
+         if (el == WorldMap::TERRAIN_GRASS)
+            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 255, 0));
+         else if (el == WorldMap::TERRAIN_OCEAN)
+            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 0, 255));
+         else if (el == WorldMap::TERRAIN_ROCK)
+            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(100, 100, 0));
+
+         if (structure == WorldMap::STRUCTURE_BLUE_FLAG) {
+            al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3);
+            //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(0, 0, 255));
+         }else if (structure == WorldMap::STRUCTURE_RED_FLAG) {
+            al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3);
+            //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(255, 0, 0));
+         }
+      }
+   }
+
+   for (int x=0; x<gameMap->width; x++)
+   {
+      for (int y=0; y<gameMap->height; y++)
+      {
+         vector<WorldMap::Object> vctObjects = gameMap->getObjects(x, y);
+
+         vector<WorldMap::Object>::iterator it;
+         for(it = vctObjects.begin(); it != vctObjects.end(); it++) {
+            switch(it->type) {
+               case WorldMap::OBJECT_BLUE_FLAG:
+                  al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(0, 0, 255));
+                  break;
+               case WorldMap::OBJECT_RED_FLAG:
+                  al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(255, 0, 0));
+                  break;
+            }
+         }
+      }
+   }
+}
+
+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));
+   }
+}
+
+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 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -0,0 +1,31 @@
+#ifndef _GAMERENDER_H
+#define _GAMERENDER_H
+
+/*
+ * We don't want to place allegro drawing routines in any classes shared by the client and server
+ * because the server shouldn't require Allegro
+ */
+
+#include "../../common/Compiler.h"
+
+#include <map>
+
+#ifdef WINDOWS
+   #define WIN32_LEAN_AND_MEAN
+#endif
+
+#include <allegro5/allegro_font.h>
+
+#include "../../common/Player.h"
+#include "../../common/WorldMap.h"
+
+class GameRender
+{
+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);
+};
+
+#endif
+
Index: client/Client/GuiComponent.h
===================================================================
--- client/Client/GuiComponent.h	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/GuiComponent.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -5,6 +5,4 @@
 #include <allegro5/allegro_primitives.h>
 #include <allegro5/allegro_font.h>
-
-#include "../../common/Compiler.h"
 
 class GuiComponent
Index: client/Client/Textbox.cpp
===================================================================
--- client/Client/Textbox.cpp	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/Textbox.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -2,4 +2,6 @@
 
 #include <iostream>
+
+#include "../../common/Compiler.h"
 
 using namespace std;
Index: client/Client/chat.h
===================================================================
--- client/Client/chat.h	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/chat.h	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -1,3 +1,4 @@
-#pragma once
+#ifndef _CHAT_H
+#define _CHAT_H
 
 #include <string>
@@ -28,2 +29,4 @@
 };
 
+#endif
+
Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 0693e2599655a2993d6f13aab9e37a08c4d2e0ac)
+++ client/Client/main.cpp	(revision 373089e902c6dfaf126a82d509c141d0d9796133)
@@ -3,5 +3,5 @@
 #if defined WINDOWS
    #include <winsock2.h>
-   #include <WS2tcpip.h>
+   #include <ws2tcpip.h>
 #elif defined LINUX
    #include <sys/types.h>
@@ -37,8 +37,11 @@
 
 #include "Window.h"
+#include "TextLabel.h"
+#include "Button.h"
 #include "Textbox.h"
-#include "Button.h"
 #include "RadioButtonList.h"
-#include "TextLabel.h"
+
+#include "GameRender.h"
+
 #include "chat.h"
 
@@ -52,6 +55,4 @@
 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 drawMap(WorldMap* gameMap);
-void drawPlayers(map<unsigned int, Player>& mapPlayers, ALLEGRO_FONT* font, unsigned int curPlayerId);
 int getRefreshRate(int width, int height);
 void drawMessageStatus(ALLEGRO_FONT* font);
@@ -482,6 +483,6 @@
             al_draw_text(font, al_map_rgb(0, 255, 0), 515, 80, ALLEGRO_ALIGN_LEFT, ossScoreRed.str().c_str());
 
-            drawMap(game->getMap());
-            game->drawPlayers(font, curPlayerId);
+            GameRender::drawMap(game->getMap());
+            GameRender::drawPlayers(game->getPlayers(), font, curPlayerId);
          }
          else if (wndCurrent == wndGame)
@@ -519,6 +520,6 @@
             }
 
-            drawMap(gameMap);
-            drawPlayers(mapPlayers, font, curPlayerId);
+            GameRender::drawMap(gameMap);
+            GameRender::drawPlayers(mapPlayers, font, curPlayerId);
 
             // draw projectiles
@@ -948,116 +949,4 @@
          break;
       }
-   }
-}
-
-// this should probably be in the WorldMap class
-void drawMap(WorldMap* gameMap)
-{
-   POSITION mapPos;
-   mapPos.x = 0;
-   mapPos.y = 0;
-   mapPos = mapToScreen(mapPos);
-
-   for (int x=0; x<gameMap->width; x++)
-   {
-      for (int y=0; y<gameMap->height; y++)
-      {
-         WorldMap::TerrainType el = gameMap->getElement(x, y);
-         WorldMap::StructureType structure = gameMap->getStructure(x, y);
-
-         if (el == WorldMap::TERRAIN_GRASS)
-            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 255, 0));
-         else if (el == WorldMap::TERRAIN_OCEAN)
-            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(0, 0, 255));
-         else if (el == WorldMap::TERRAIN_ROCK)
-            al_draw_filled_rectangle(x*25+mapPos.x, y*25+mapPos.y, x*25+25+mapPos.x, y*25+25+mapPos.y, al_map_rgb(100, 100, 0));
-
-         if (structure == WorldMap::STRUCTURE_BLUE_FLAG) {
-            al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3);
-            //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(0, 0, 255));
-         }else if (structure == WorldMap::STRUCTURE_RED_FLAG) {
-            al_draw_circle(x*25+12+mapPos.x, y*25+12+mapPos.y, 12, al_map_rgb(0, 0, 0), 3);
-            //al_draw_filled_rectangle(x*25+5+mapPos.x, y*25+5+mapPos.y, x*25+20+mapPos.x, y*25+20+mapPos.y, al_map_rgb(255, 0, 0));
-         }
-      }
-   }
-
-   for (int x=0; x<gameMap->width; x++)
-   {
-      for (int y=0; y<gameMap->height; y++)
-      {
-         vector<WorldMap::Object> vctObjects = gameMap->getObjects(x, y);
-
-         vector<WorldMap::Object>::iterator it;
-         for(it = vctObjects.begin(); it != vctObjects.end(); it++) {
-            switch(it->type) {
-               case WorldMap::OBJECT_BLUE_FLAG:
-                  al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(0, 0, 255));
-                  break;
-               case WorldMap::OBJECT_RED_FLAG:
-                  al_draw_filled_rectangle(it->pos.x-8+mapPos.x, it->pos.y-8+mapPos.y, it->pos.x+8+mapPos.x, it->pos.y+8+mapPos.y, al_map_rgb(255, 0, 0));
-                  break;
-            }
-         }
-      }
-   }
-}
-
-void 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));
    }
 }
