public void messageReceived(Client source, Message m) {

        if (m instanceof PingMessage) {

            PingMessage pm = (PingMessage) m;

            if (pm.isFromServer()) {
                this.ping = pm.getPing();
            }
        }

        if (m instanceof ServerSummarizeMessage) {

            ServerSummarizeMessage ssm = (ServerSummarizeMessage) m;
            playerData = ssm.playerData;

            if (onDataChangedListeners != null) {
                for (OnDataChangedListener odcl : onDataChangedListeners) {
                    odcl.onDataChanged(this);
                }
            } else {
                System.out.println("GameData: no listeners for serverSummarizeMessages.");
            }
        }

        if (m instanceof TestMessage) {
            TestMessage tm = (TestMessage) m;
            myPlayerKey = tm.playerKey;
        }

    }