private StandardHeuristic( StandardHeuristic existing, IReadOnlyPuzzleWithMutablePossibleValues?puzzle, ReadOnlySpan <IRule> rules) { _rowHeuristic = (UniqueInRowHeuristic)existing._rowHeuristic.CopyWithNewReferences( puzzle, rules); _columnHeuristic = (UniqueInColumnHeuristic)existing._columnHeuristic .CopyWithNewReferences(puzzle, rules); _boxHeuristic = (UniqueInBoxHeuristic)existing._boxHeuristic.CopyWithNewReferences( puzzle, rules); _numHeuristicsRan = new Stack <int>(existing._numHeuristicsRan); }
private StandardHeuristic( StandardHeuristic existing, IReadOnlyPuzzle puzzle, PossibleValues possibleValues, IReadOnlyList <ISudokuRule> rules) { _rowHeuristic = (UniqueInRowHeuristic)existing._rowHeuristic.CopyWithNewReferences( puzzle, possibleValues, rules); _columnHeuristic = (UniqueInColumnHeuristic)existing._columnHeuristic .CopyWithNewReferences(puzzle, possibleValues, rules); _boxHeuristic = (UniqueInBoxHeuristic)existing._boxHeuristic.CopyWithNewReferences( puzzle, possibleValues, rules); _numHeuristicsRan = new Stack <int>(existing._numHeuristicsRan); }