@Override public Map<Cell, BitSet> getGreenPotentials(int viewNum) { Map<Cell, BitSet> result = new HashMap<Cell, BitSet>(); BitSet b1 = (BitSet) extraValues.get(bugCell1).clone(); b1.set(value); // orange result.put(bugCell1, b1); BitSet b2 = (BitSet) extraValues.get(bugCell2).clone(); b2.set(value); // orange result.put(bugCell2, b2); return result; }
@Override public Map<Cell, BitSet> getRedPotentials(int viewNum) { Map<Cell, BitSet> removable = super.getRemovablePotentials(); Map<Cell, BitSet> result = new HashMap<Cell, BitSet>(); for (Cell cell : removable.keySet()) { BitSet values = (BitSet) removable.get(cell).clone(); values.set(value); // orange result.put(cell, values); } return result; }