private static void processMessage(GameState state, byte[] data, String senderGID){

        Decoder dec = new Decoder(data);
       
        try {
            if(dec.getTypeByte()==UpdateShip.asnType && state==GameState.PLAYING) {
                if(DEBUG)System.out.println("processMessage: UpdateShip(start)");
                //Do update ship operations
                UpdateShip msg = (UpdateShip) new UpdateShip().decode(dec);
                
                Connection sender = Connection.getConnection(senderGID);
                if(sender == null) {
                	Connection.addConnection(senderGID);
                	sender = Connection.getConnection(senderGID);
                }
                
                if(sender.isValid(msg.getSequenceNumber())) {
                	sender.update(msg.getSequenceNumber());
                	ArrayList<ShipData> sdlist = msg.getShipData();
                	for(ShipData sd: sdlist) {
                		DataController.getInstance().updateShipFromPeer(sd);
                	}
                }
                
                if(DEBUG)System.out.println("processMessage: UpdateShip(end)");
            } else {
                if(DEBUG)System.out.println("processMessage: Received Unknown Message Type");
            }
        }
        catch (ASN1DecoderFail ex) {
                Logger.getLogger(NetworkController.class.getName()).log(Level.SEVERE, null, ex);
        }
    }