bool Sudoku::exclusiveRange() { bool found = false; for (int i = 0; i < 81; i++) { if (mData[i] != 0) continue; int value = stepIndex(i); if (value != 0) { found = true; } } return found; }
symbolChooser::symbolChooser(int symbolDimension, const QVector<triC>& colors, int borderDimension) : colors_(colors), symbolDimension_(symbolDimension), borderDimension_(borderDimension) { std::sort(colors_.begin(), colors_.end(), triCIntensityDefinite()); initializeSymbolList(); const int colorCount = colors_.size(); const int characterCount = unicodeCharacters_.size(); // use "just enough" symbols to cover the number of colors we need for (int i = 1; i <= MAX_NUM_SYMBOL_TYPES; ++i) { numSymbolTypes_ = i; if (numSymbolTypes_ * characterCount >= colorCount + 30) { break; } } colorIndex_ = stepIndex(0, numberOfSymbols(), 1); // it's possible these symbols will never get used with the default values, but // we still need to establish the color-->symbol correspondence here for (int i = 0, size = colors_.size(); i < size; ++i) { createNewSymbolCurDims(colors_[i].qrgb()); } }