Index: common/Game.cpp
===================================================================
--- common/Game.cpp	(revision 70fc3e8c64627860a5f0a40e73b45bc85bd3da6d)
+++ common/Game.cpp	(revision 012970027445bcb5af858de36c8fea1f47dc16fe)
@@ -67,4 +67,25 @@
 }
 
+bool Game::startPlayerMovement(unsigned int id, int x, int y) {
+   // need to check if players actually contains the id
+   Player* p = players[id];
+
+   // we need to make sure the player can move here
+   if (0 <= x && x < this->worldMap->width*25 &&
+       0 <= y && y < this->worldMap->height*25 &&
+       this->worldMap->getElement(x/25, y/25) == WorldMap::TERRAIN_GRASS)
+   {
+      p->target.x = x;
+      p->target.y = y;
+
+      p->isChasing = false;
+      p->isAttacking = false;
+
+      return true;
+   }
+   else
+      return false;
+}
+
 void Game::setRedScore(int score) {
    this->redScore = score;
Index: common/Game.h
===================================================================
--- common/Game.h	(revision 70fc3e8c64627860a5f0a40e73b45bc85bd3da6d)
+++ common/Game.h	(revision 012970027445bcb5af858de36c8fea1f47dc16fe)
@@ -41,4 +41,5 @@
    bool addPlayer(Player* p);
    bool removePlayer(unsigned int id);
+   bool startPlayerMovement(unsigned int id, int x, int y);
    void setBlueScore(int score);
    void setRedScore(int score);
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision 70fc3e8c64627860a5f0a40e73b45bc85bd3da6d)
+++ server/server.cpp	(revision 012970027445bcb5af858de36c8fea1f47dc16fe)
@@ -818,16 +818,5 @@
               p->addr.sin_port == from.sin_port )
          {
-            // we need to make sure the player can move here
-            if (0 <= x && x < gameMap->width*25 && 0 <= y && y < gameMap->height*25 &&
-               gameMap->getElement(x/25, y/25) == WorldMap::TERRAIN_GRASS)
-            {
-               cout << "valid terrain" << endl;
-
-               p->target.x = x;
-               p->target.y = y;
-
-               p->isChasing = false;
-               p->isAttacking = false;
-
+            if (p->currentGame->startPlayerMovement(id, x, y)) {
                serverMsg.type = MSG_TYPE_PLAYER_MOVE;
                
