Exemple #1
0
        public virtual void Solve()
        {
            DancingLinks <Sudoku.ColumnName> model = MakeModel();
            int results = model.Solve(new Sudoku.SolutionPrinter(size));

            System.Console.Out.WriteLine("Found " + results + " solutions");
        }
Exemple #2
0
 /// <summary>Find all of the solutions that start with the given prefix.</summary>
 /// <remarks>
 /// Find all of the solutions that start with the given prefix. The printer
 /// is given each solution as it is found.
 /// </remarks>
 /// <param name="split">
 /// a list of row indexes that should be choosen for each row
 /// in order
 /// </param>
 /// <returns>the number of solutions found</returns>
 public virtual int Solve(int[] split)
 {
     return(dancer.Solve(split, printer));
 }