@Override
        public void messageReceived(S source, final Message message)
        {
            if(message instanceof LoginFailedMessage)
            {
                ConnectController.getInstance().displayFailure(((LoginFailedMessage) message).getReason());
            }
            else if(message instanceof LoginSuccessMessage)
            {
				Main.getInstance().enqueue(new Callable<Void>() {
					@Override
					public Void call() throws Exception
					{
                        Main.getInstance().initializeInterface();
						Main.getInstance().initializeMap((LoginSuccessMessage) message);
						return null;
					}
				});
            }
            else if(message instanceof ShutdownMessage)
			{
				Main.getInstance().TTMOStop();
			}
			else if(message instanceof MapUpdateMessage)
            {
                MapUpdateMessage mapUpdateMessage = (MapUpdateMessage) message;
                GameMap.getInstance().addGridSquare(mapUpdateMessage.getGridSquare(), new ClientGuiObjectFactory());
            }
			else if(message instanceof ScoreUpdateMessage)
			{
				Main.getInstance().updateScore(((ScoreUpdateMessage) message).getScore());
			}
			else if(message instanceof ResourceUpdateMessage)
			{
				Main.getInstance().updateResources((ResourceUpdateMessage) message);
			}
        }