Index: client/Client/Client.vcxproj
===================================================================
--- client/Client/Client.vcxproj	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ client/Client/Client.vcxproj	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -65,4 +65,5 @@
   <ItemGroup>
     <ClCompile Include="..\..\common\Common.cpp" />
+    <ClCompile Include="..\..\common\WorldMap.cpp" />
     <ClCompile Include="..\..\common\Message.cpp" />
     <ClCompile Include="..\..\common\Player.cpp" />
@@ -77,4 +78,5 @@
     <ClInclude Include="..\..\common\Common.h" />
     <ClInclude Include="..\..\common\Compiler.h" />
+    <ClInclude Include="..\..\common\WorldMap.h" />
     <ClInclude Include="..\..\common\Message.h" />
     <ClInclude Include="..\..\common\Player.h" />
Index: client/Client/Client.vcxproj.filters
===================================================================
--- client/Client/Client.vcxproj.filters	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ client/Client/Client.vcxproj.filters	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -55,4 +55,7 @@
       <Filter>Source Files\common</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\common\WorldMap.cpp">
+      <Filter>Source Files\gui</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
@@ -84,4 +87,7 @@
       <Filter>Header Files\common</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\common\WorldMap.h">
+      <Filter>Header Files\common</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ client/Client/main.cpp	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -29,5 +29,6 @@
 #include "../../common/Message.h"
 #include "../../common/Common.h"
-#include "../../common/Player.h"_
+#include "../../common/Player.h"
+#include "../../common/WorldMap.h"
 
 #include "Window.h"
@@ -45,5 +46,8 @@
 void shutdownWinSock();
 void processMessage(NETWORK_MSG &msg, int &state, chat &chatConsole, map<unsigned int, Player>& mapPlayers, unsigned int& curPlayerId);
+void drawMap(WorldMap* gameMap);
 void drawPlayers(map<unsigned int, Player>& mapPlayers, unsigned int curPlayerId);
+POSITION screenToMap(POSITION pos);
+POSITION mapToScreen(POSITION pos);
 
 // callbacks
@@ -156,4 +160,6 @@
    }
 
+   WorldMap* gameMap = WorldMap::createDefaultMap();
+
    wndLogin = new Window(0, 0, SCREEN_W, SCREEN_H);
    wndLogin->addComponent(new Textbox(104, 40, 100, 20, font));
@@ -306,9 +312,19 @@
             msgTo.type = MSG_TYPE_PLAYER_MOVE;
 
-            memcpy(msgTo.buffer, &curPlayerId, 4);
-            memcpy(msgTo.buffer+4, &ev.mouse.x, 4);
-            memcpy(msgTo.buffer+8, &ev.mouse.y, 4);
-
-            sendMessage(&msgTo, sock, &server);
+            POSITION pos;
+            pos.x = ev.mouse.x;
+            pos.y = ev.mouse.y;
+            pos = screenToMap(pos);
+
+            if (pos.x != -1)
+            {
+               memcpy(msgTo.buffer, &curPlayerId, 4);
+               memcpy(msgTo.buffer+4, &pos.x, 4);
+               memcpy(msgTo.buffer+8, &pos.y, 4);
+
+               sendMessage(&msgTo, sock, &server);
+            }
+            else
+               cout << "Invalid point: User did not click on the map" << endl;
          }
       }
@@ -326,6 +342,4 @@
          wndCurrent->draw(display);
 
-         drawPlayers(mapPlayers, curPlayerId);
-
          chatConsole.draw(font, al_map_rgb(255,255,255));
 
@@ -336,4 +350,7 @@
          else if(wndCurrent == wndMain) {
             al_draw_text(font, al_map_rgb(0, 255, 0), 4, 43, ALLEGRO_ALIGN_LEFT, "Message:");
+
+            drawMap(gameMap);
+            drawPlayers(mapPlayers, curPlayerId);
          }
 
@@ -352,4 +369,6 @@
    delete wndLogin;
    delete wndMain;
+
+   delete gameMap;
 
    al_destroy_event_queue(event_queue);
@@ -392,4 +411,26 @@
    WSACleanup();
 #endif
+}
+
+POSITION screenToMap(POSITION pos)
+{
+   pos.x = pos.x-300;
+   pos.y = pos.y-100;
+
+   if (pos.x < 0 || pos.y < 0)
+   {
+      pos.x = -1;
+      pos.y = -1;
+   }
+
+   return pos;
+}
+
+POSITION mapToScreen(POSITION pos)
+{
+   pos.x = pos.x+300;
+   pos.y = pos.y+100;
+
+   return pos;
 }
 
@@ -498,16 +539,42 @@
 }
 
+void drawMap(WorldMap* gameMap)
+{
+   POSITION mapPos;
+   mapPos.x = 0;
+   mapPos.y = 0;
+   mapPos = mapToScreen(mapPos);
+   for (int x=0; x<12; x++)
+   {
+      for (int y=0; y<12; y++)
+      {
+         WorldMap::TerrainType el = gameMap->getElement(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));
+      }
+   }
+}
+
 void drawPlayers(map<unsigned int, Player>& mapPlayers, unsigned int curPlayerId)
 {
    map<unsigned int, Player>::iterator it;
+
+   Player* p;
+   POSITION pos;
 
    for(it = mapPlayers.begin(); it != mapPlayers.end(); it++)
    {
-      Player *p = &it->second;
+      p = &it->second;
+      pos = mapToScreen(p->pos);
 
       if (p->id == curPlayerId)
-         al_draw_filled_circle(p->pos.x, p->pos.y, 15, al_map_rgb(0, 255, 0));
+         al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(255, 0, 0));
       else
-         al_draw_filled_circle(p->pos.x, p->pos.y, 30, al_map_rgb(255, 0, 0));
+         al_draw_filled_circle(pos.x, pos.y, 12, al_map_rgb(191, 0, 0));
    }
 }
Index: common/Common.h
===================================================================
--- common/Common.h	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ common/Common.h	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -18,5 +18,5 @@
    int x;
    int y;
-} PLAYER_POS;
+} POSITION;
 
 #endif
Index: mmon/Map.cpp
===================================================================
--- common/Map.cpp	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#include "Map.h"
-
-using namespace std;
-
-Map::Map(int width, int height)
-{
-   this->width = width;
-   this->height = height;
-
-   vctMap = new vector<vector<TerrainType>*>(width);
-
-   for (int x=0; x<width; x++) {
-      vector<TerrainType>* newVector = new vector<TerrainType>(height);
-
-      for (int y=0; y<height; y++)
-         (*newVector)[y] = TERRAIN_NONE;
-
-      (*vctMap)[x] = newVector;
-   }
-}
-
-Map::~Map()
-{
-   for (int x=0; x<width; x++)
-      delete (*vctMap)[x];
-
-   delete vctMap;
-}
-
-void Map::setElement(int x, int y, TerrainType t)
-{
-   (*(*vctMap)[x])[y] = t;
-}
-
-Map* Map::createDefaultMap()
-{
-   Map* m = new Map(20l, 20);
-
-   for(int x=0; x<20; x++)
-   {   
-      for(int y=0; y<20; y++)
-      {
-         if (x ==0 || y == 0 || x == 19 || y == 19)
-            m->setElement(x, y, TERRAIN_OCEAN);
-         else
-            m->setElement(x, y, TERRAIN_GRASS);
-      }
-   }
-
-   return m;
-}
Index: mmon/Map.h
===================================================================
--- common/Map.h	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#ifndef _MAP_H
-#define _MAP_H
-
-#include <vector>
-
-using namespace std;
-
-class Map {
-public:
-   enum TerrainType {
-      TERRAIN_NONE,
-      TERRAIN_GRASS,
-      TERRAIN_OCEAN
-   };
-
-   int width, height;
-   vector<vector<TerrainType>*>* vctMap;
-
-   Map(int width, int height);
-
-   ~Map();
-
-   void setElement(int x, int y, TerrainType type);
-
-   static Map* createDefaultMap();
-};
-
-#endif
Index: common/Player.h
===================================================================
--- common/Player.h	(revision 60b77d211177cc4fb312ffdc3f6873bc8b6bc46d)
+++ common/Player.h	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -36,5 +36,5 @@
    string password;
    sockaddr_in addr;
-   PLAYER_POS pos;
+   POSITION pos;
 };
 
Index: common/WorldMap.cpp
===================================================================
--- common/WorldMap.cpp	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ common/WorldMap.cpp	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -0,0 +1,58 @@
+#include "WorldMap.h"
+
+using namespace std;
+
+WorldMap::WorldMap(int width, int height)
+{
+   this->width = width;
+   this->height = height;
+
+   vctMap = new vector<vector<TerrainType>*>(width);
+
+   for (int x=0; x<width; x++) {
+      vector<TerrainType>* newVector = new vector<TerrainType>(height);
+
+      for (int y=0; y<height; y++)
+         (*newVector)[y] = TERRAIN_NONE;
+
+      (*vctMap)[x] = newVector;
+   }
+}
+
+WorldMap::~WorldMap()
+{
+   for (int x=0; x<width; x++)
+      delete (*vctMap)[x];
+
+   delete vctMap;
+}
+
+WorldMap::TerrainType WorldMap::getElement(int x, int y)
+{
+   return (*(*vctMap)[x])[y];
+}
+
+void WorldMap::setElement(int x, int y, TerrainType t)
+{
+   (*(*vctMap)[x])[y] = t;
+}
+
+WorldMap* WorldMap::createDefaultMap()
+{
+   WorldMap* m = new WorldMap(12l, 12);
+
+   for(int x=0; x<12; x++)
+   {   
+      for(int y=0; y<12; y++)
+      {
+         if (x ==0 || y == 0 || x == 11 || y == 11)
+            m->setElement(x, y, TERRAIN_OCEAN);
+         else
+            m->setElement(x, y, TERRAIN_GRASS);
+      }
+   }
+
+   m->setElement(5, 5, TERRAIN_ROCK);
+
+   return m;
+}
Index: common/WorldMap.h
===================================================================
--- common/WorldMap.h	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
+++ common/WorldMap.h	(revision 62ee2ceb8ecee33c00a41267ea1c22a94758a04d)
@@ -0,0 +1,30 @@
+#ifndef _WORLDMAP_H
+#define _WORLDMAP_H
+
+#include <vector>
+
+using namespace std;
+
+class WorldMap {
+public:
+   enum TerrainType {
+      TERRAIN_NONE,
+      TERRAIN_GRASS,
+      TERRAIN_OCEAN,
+      TERRAIN_ROCK
+   };
+
+   int width, height;
+   vector<vector<TerrainType>*>* vctMap;
+
+   WorldMap(int width, int height);
+
+   ~WorldMap();
+
+   TerrainType getElement(int x, int y);
+   void setElement(int x, int y, TerrainType type);
+
+   static WorldMap* createDefaultMap();
+};
+
+#endif
