Index: client/Client/main.cpp
===================================================================
--- client/Client/main.cpp	(revision 3e44a59703de814c41c541cc1ab28333ebddf311)
+++ client/Client/main.cpp	(revision e1af80c7e31a16db4591bd15fb35b660e038dcdf)
@@ -56,6 +56,5 @@
 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,
-                    GameSummary* gameSummary);
+                    map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed);
 int getRefreshRate(int width, int height);
 void drawMessageStatus(ALLEGRO_FONT* font);
@@ -458,5 +457,5 @@
 
       if (msgProcessor.receiveMessage(&msgFrom, sock, &from, &outputLog) >= 0)
-         processMessage(msgFrom, state, chatConsole, gameMap, mapPlayers, mapProjectiles, curPlayerId, scoreBlue, scoreRed, gameSummary);
+         processMessage(msgFrom, state, chatConsole, gameMap, mapPlayers, mapProjectiles, curPlayerId, scoreBlue, scoreRed);
 
       if (redraw)
@@ -606,18 +605,35 @@
             }
          }else if (wndCurrent == wndGameSummary) {
-            string strBlueScore = "Blue Score: "+gameSummary->getBlueScore();
-            string strRedScore = "Red Score: "+gameSummary->getRedScore();
+            cout << "Drawing game summary" << endl;
+
+            cout << "blue score from obj: " << gameSummary->getBlueScore() << endl;
+            cout << "red score from obj: " << gameSummary->getRedScore() << endl;
+
+            ostringstream ossBlueScore, ossRedScore;
+
+            cout << "Declared scores" << endl;
+
+            ossBlueScore << "Blue Score: " << gameSummary->getBlueScore();
+            ossRedScore << "Red Score: " << gameSummary->getRedScore();
+
+            cout << "set scores" << endl;
 
             string strWinner;
 
             if (gameSummary->getWinner() == 0)
-                strWinner = "Blue Team Wins";
+               strWinner = "Blue Team Wins";
             else if (gameSummary->getWinner() == 1)
-                strWinner = "Red Team Wins";
+               strWinner = "Red Team Wins";
+            else
+               strWinner = "winner set to wrong value";
+
+            cout << "Calling the drawing routines" << endl;
 
             al_draw_text(font, al_map_rgb(0, 255, 0), 512, 40, ALLEGRO_ALIGN_CENTRE, gameSummary->getName().c_str());
-            al_draw_text(font, al_map_rgb(0, 255, 0), 330, 80, ALLEGRO_ALIGN_LEFT, strBlueScore.c_str());
-            al_draw_text(font, al_map_rgb(0, 255, 0), 515, 80, ALLEGRO_ALIGN_LEFT, strRedScore.c_str());
+            al_draw_text(font, al_map_rgb(0, 255, 0), 330, 80, ALLEGRO_ALIGN_LEFT, ossBlueScore.str().c_str());
+            al_draw_text(font, al_map_rgb(0, 255, 0), 515, 80, ALLEGRO_ALIGN_LEFT, ossRedScore.str().c_str());
             al_draw_text(font, al_map_rgb(0, 255, 0), 512, 120, ALLEGRO_ALIGN_CENTRE, strWinner.c_str());
+
+            cout << "Done drawing game summary" << endl;
          }
 
@@ -705,6 +721,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,
-                    GameSummary* gameSummary)
+                    map<unsigned int, Projectile>& mapProjectiles, unsigned int& curPlayerId, int &scoreBlue, int &scoreRed)
 {
    // this is outdated since most messages now don't contain just a text string
@@ -1032,10 +1047,15 @@
                cout << "Should switch to STATE_LOBBY and show the final score" << endl;
 
-               string gameName(msg.buffer);
-
                unsigned int winner, blueScore, redScore;
-               memcpy(&winner, msg.buffer+4, 4);
-               memcpy(&blueScore, msg.buffer+8, 4);
-               memcpy(&redScore, msg.buffer+12, 4);
+               memcpy(&winner, msg.buffer, 4);
+               memcpy(&blueScore, msg.buffer+4, 4);
+               memcpy(&redScore, msg.buffer+8, 4);
+
+               string gameName(msg.buffer+12);
+
+               cout << "winner: " << winner << endl;
+               cout << "blueScore: " << blueScore << endl;
+               cout << "redScore: " << redScore << endl;
+               cout << "gameName: " << gameName << endl;
 
                gameSummary = new GameSummary(gameName, winner, blueScore, redScore);
@@ -1046,4 +1066,9 @@
                wndCurrent = wndGameSummary;
 
+
+               cout << "winner from obj: " << gameSummary->getWinner() << endl;
+               cout << "blueScore from obj: " << gameSummary->getBlueScore() << endl;
+               cout << "redScore from obj: " << gameSummary->getRedScore() << endl;
+               cout << "gameName from obj: " << gameSummary->getName() << endl;
                break;
             }
@@ -1448,4 +1473,6 @@
 {
     delete gameSummary;
+    gameSummary = NULL;
     wndCurrent = wndLobby;
-}
+    cout << "Processed button actions" << endl;
+}
