using System.Collections.Generic; using uqac_ia_sudoku_csp.Interfaces; namespace uqac_ia_sudoku_csp.Solver.NextValueChoosers { public class BasicValueChooser : INextValueChooser { public void SelectVariable(Board board, out int x, out int y, IList constraints) { for (var xx = 0; xx < board.Size; ++xx) { for (var yy = 0; yy < board.Size; ++yy) { if (board.GetNumber(xx, yy) == null) { x = xx; y = yy; return; } } } x = -1; y = -1; } } }