private static boolean isLineCorrect(final int[][] solution, final boolean isRow) {
        BitSet numbers = new BitSet();
        for (int i = 0; i < FIELD_SIZE; ++i) {
            for (int j = 0; j < FIELD_SIZE; ++j) {
                numbers.set(isRow ? solution[i][j] : solution[j][i]);
            }

            if (numbers.cardinality() < FIELD_SIZE) {
                return false;
            }
            numbers.clear();
        }

        return true;
    }