for(Iterator<NarcPod> iter=pendingNarcPods.iterator();iter.hasNext();) { NarcPod p = iter.next(); if(p.getLocation() == i) { iter.remove(); } } for(Iterator<INarcPod> iter=pendingINarcPods.iterator();iter.hasNext();) { INarcPod p = iter.next(); if(p.getLocation() == i) { iter.remove(); } }
    public void applyDamage() {        // mark all damaged equipment destroyed and empty        for (Mounted mounted : getEquipment()){            if (mounted.isHit() || mounted.isMissing()) {                mounted.setShotsLeft(0);                mounted.setDestroyed(true);            }        }        // destroy criticals that were hit last phase        for (int i = 0; i < locations(); i++) {            for (int j = 0; j < getNumberOfCriticals(i); j++) {                final CriticalSlot cs = getCritical(i, j);                if (cs != null) {                    cs.setDestroyed(cs.isDamaged());                }            }        }        // destroy armor/internals if the section was removed        for (int i = 0; i < locations(); i++) {            if (getInternal(i) == IArmorState.ARMOR_DOOMED) {                setArmor(IArmorState.ARMOR_DESTROYED, i);                setArmor(IArmorState.ARMOR_DESTROYED, i, true);                setInternal(IArmorState.ARMOR_DESTROYED, i);                //destroy any Narc beacons                for(Iterator<NarcPod> iter=narcPods.iterator();iter.hasNext();) {                    NarcPod p = iter.next();                    if(p.getLocation() == i) {                        iter.remove();                    }                }                for(Iterator<INarcPod> iter=iNarcPods.iterator();iter.hasNext();) {                    INarcPod p = iter.next();                    if(p.getLocation() == i) {                        iter.remove();                    }                }            }        }    }