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