Index: common/Game.cpp
===================================================================
--- common/Game.cpp	(revision fef7c691aac84142e3afc13f8fad7583193af41c)
+++ common/Game.cpp	(revision 402cf86857bd74889d5f5ddc68a7ee9ebd44c16a)
@@ -88,4 +88,28 @@
 }
 
+// returns true if the movement should be canceled
+bool Game::processPlayerMovement(Player* p, FLOAT_POSITION oldPos) {
+
+   // check if the move needs to be canceled
+   switch(this->worldMap->getElement(p->pos.x/25, p->pos.y/25))
+   {
+      case WorldMap::TERRAIN_NONE:
+      case WorldMap::TERRAIN_OCEAN:
+      case WorldMap::TERRAIN_ROCK:
+      {
+         p->pos = oldPos;
+         p->target.x = p->pos.x;
+         p->target.y = p->pos.y;
+         p->isChasing = false;
+         return true;
+         break;
+      }
+      default:
+         // if there are no obstacles, don't cancel movement
+         return false;
+         break;
+      }
+}
+
 void Game::setRedScore(int score) {
    this->redScore = score;
Index: common/Game.h
===================================================================
--- common/Game.h	(revision fef7c691aac84142e3afc13f8fad7583193af41c)
+++ common/Game.h	(revision 402cf86857bd74889d5f5ddc68a7ee9ebd44c16a)
@@ -42,4 +42,6 @@
    bool removePlayer(unsigned int id);
    bool startPlayerMovement(unsigned int id, int x, int y);
+   bool processPlayerMovement(Player* p, FLOAT_POSITION oldPos);
+
    void setBlueScore(int score);
    void setRedScore(int score);
Index: data/map.txt
===================================================================
--- data/map.txt	(revision fef7c691aac84142e3afc13f8fad7583193af41c)
+++ data/map.txt	(revision 402cf86857bd74889d5f5ddc68a7ee9ebd44c16a)
@@ -10,5 +10,5 @@
 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
-2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
+2,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,2
 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
 2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision fef7c691aac84142e3afc13f8fad7583193af41c)
+++ server/server.cpp	(revision 402cf86857bd74889d5f5ddc68a7ee9ebd44c16a)
@@ -138,5 +138,4 @@
    while (!done)
    {
-
       usleep(5000);
 
@@ -217,32 +216,18 @@
          }
 
-         // move all players
-         // maybe put this in a separate method
+         // process players currently in a game
          FLOAT_POSITION oldPos;
-         bool broadcastMove = false;
          for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
          {
+            bool broadcastMove = false;
+
+            // move player and perform associated tasks
             oldPos = it->second->pos;
-            if (it->second->move(gameMap)) {
-
-               // check if the move needs to be canceled
-               switch(gameMap->getElement(it->second->pos.x/25, it->second->pos.y/25))
-               {
-                  case WorldMap::TERRAIN_NONE:
-                  case WorldMap::TERRAIN_OCEAN:
-                  case WorldMap::TERRAIN_ROCK:
-                  {
-                     it->second->pos = oldPos;
-                     it->second->target.x = it->second->pos.x;
-                     it->second->target.y = it->second->pos.y;
-                     it->second->isChasing = false;
-                     broadcastMove = true;
-                     break;
-                  }
-                  default:
-                     // if there are no obstacles, do nothing
-                     break;
-               }
-
+            if (it->second->move(it->second->currentGame->getMap())) {
+
+               if (it->second->currentGame->processPlayerMovement(it->second, oldPos))
+                   broadcastMove = true;
+
+               /*
                WorldMap::ObjectType flagType;
                POSITION pos;
@@ -397,4 +382,5 @@
                   }
                }
+               */
 
                if (broadcastMove)
@@ -403,7 +389,10 @@
                   it->second->serialize(serverMsg.buffer);
 
+                  // only broadcast message to other players in the same game
                   cout << "about to broadcast move" << endl;
+
+                  map<unsigned int, Player*> playersInGame = it->second->currentGame->getPlayers();
                   map<unsigned int, Player*>::iterator it2;
-                  for (it2 = mapPlayers.begin(); it2 != mapPlayers.end(); it2++)
+                  for (it2 = playersInGame.begin(); it2 != playersInGamePlayers.end(); it2++)
                   {
                      if ( msgProcessor.sendMessage(&serverMsg, sock, &(it2->second->addr), &outputLog) < 0 )
