@Override
  public void received( Connection connection, Object object ) {
    if (object instanceof ControlMessage) {
      ControlMessage msg = (ControlMessage)object;
      switch (msg.type) {

        // --- CONTROL MESSAGES ---
        case Network.CONTROL_CONNECT:
          System.out.println( connection + " REPORTS CONNECT" );

          int graphic = graphicCounter++ % Car.NUM_VEHICLES;

          // Send ACK to connecting player
          ControlMessage resp = new ControlMessage();
          resp.type = Network.CONTROL_ACK;
          resp.value = graphic;
          connection.sendTCP( resp );

          resp.type = Network.CONTROL_NEW_PLAYER;

          // Send NEW_PLAYERs to connecting player
          for (Player p : players.values()) {
            resp.value = p.id;
            resp.value2 = p.graphic;
            resp.text = p.name;
            connection.sendTCP( resp );
          }

          // Add newly connected player to list of players
          players.put( connection.getID(), new Player( connection.getID(), graphic, msg.text ) );

          // Send NEW_PLAYER to all others
          resp.value = connection.getID();
          resp.value2 = graphic;
          resp.text = msg.text;
          mServer.sendToAllExceptTCP( connection.getID(), resp );
          break;
      }
    }

    // --- MOVEMENT, STATE, ROCKET MESSAGES (SIMPLE RELAY) ---
    else if (object instanceof MoveMessage) {
      MoveMessage msg = (MoveMessage)object;

      // Tag incoming message with connection ID and broadcast to others UDP
      msg.id = connection.getID();
      mServer.sendToAllExceptUDP( connection.getID(), msg );
    } else if (object instanceof StateMessage) {
      StateMessage msg = (StateMessage)object;

      // Tag incoming message with connection ID and broadcast to others UDP
      msg.id = connection.getID();
      mServer.sendToAllExceptUDP( connection.getID(), msg );
    } else if (object instanceof RocketMessage) {
      RocketMessage msg = (RocketMessage)object;
      msg.id = connection.getID();
      mServer.sendToAllExceptTCP( connection.getID(), msg );
    }

    // --- CHAT MESSAGES ---
    else if (object instanceof ChatMessage) {
      ChatMessage msg = (ChatMessage)object;
      System.out.println( "MESSAGE FROM " + players.get( connection.getID() ).name + ": "
          + msg.text );
      if (msg.text.charAt( 0 ) == Network.COMMAND_CHARACTER) {
        List<String> parsedMsg = parseMessage( msg.text );
        System.out.println( "RADMIN CMD: " + parsedMsg.get( 0 ) );
        String cmd = parsedMsg.get( 0 ).substring( 1 ).toLowerCase();
        if (cmd.equals( "killall" )) {
          CommandMessage cmd_msg = new CommandMessage();
          cmd_msg.type = Network.COMMAND_KILL_SELF;
          mServer.sendToAllTCP( cmd_msg );
        }
      } else { // Relay message to other clients
        msg.id = connection.getID();
        mServer.sendToAllTCP( msg );
      }

    }

  }