public void reducePeers() {
        while (true) {
            boolean done = true;
            for (Square square : cells.keySet()) {
                Set<Integer> values = cells.get(square);
                int size = values.size();
                if (size == 0) {
                    throw new IllegalStateException("No values for square " + square);
                } else if (size == 1) {
                    Integer numberToRemove = new ArrayList<>(values).get(0);
                    Set<Square> peerSquares = peers.get(square);
                    for (Square peerSquare : peerSquares) {
                        if (cells.get(peerSquare).remove(numberToRemove)) {
                            done = false;
                        }
                    }
                }
            }
            if (done && !reduceUnits()) {
                break;
            }
        }
    }