for (int i = 0; i < getNumberOfCriticals(loc); i++) {
int numberOfCriticals = getNumberOfCriticals(loc); for (int i = 0; i < numberOfCriticals; i++) {
    public int getBadCriticals(int type, int index, int loc) {        int hits = 0;        for (int i = 0; i < getNumberOfCriticals(loc); i++) {            CriticalSlot ccs = getCritical(loc, i);            if (ccs != null && ccs.getType() == type && ccs.getIndex() == index) {                if (ccs.isDestroyed() || ccs.isBreached()) {                    hits++;                }            }        }        return hits;    }