src/Kingdom.OrTools.ConstraintSolver.Samples.Tests/Sudoku/SudokuProblemSolver.cs
/// <summary>
/// Makes an initial constraint on each cell if possible.
/// </summary>
/// <param name="solver"></param>
/// <param name="variable"></param>
/// <param name="value"></param>
/// <returns></returns>
Makes an initial constraint on each cell if possible.
Makes an initial constraint on each cell if possible .
private static IEnumerable<Constraint> MakeInitialConstraints(Solver solver, IntExpr variable, int value)
        {
            yield return solver.MakeBetweenCt(variable, MinimumValue + 1, MaximumValue);
            if (value.TrySolvedValue())
            {
                yield return variable == value;
            }
        }
private static IEnumerable < Constraint > MakeInitialConstraints ( Solver solver , IntExpr variable , int value ) { yield return solver . MakeBetweenCt ( variable , MinimumValue + 1 , MaximumValue ) ; if ( value . TrySolvedValue ( ) ) { yield return variable == value ; } }
Makes an initial constraint on each cell if possible.
Makes an initial constraint on each cell if possible .
// TODO: TBD: this one may change for partially solved puzzles.
None
solver
Solver
None
variable
IntExpr
None
value
int
None