Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

BasicValueChooser.cs 730B

1234567891011121314151617181920212223242526
  1. using System.Collections.Generic;
  2. using uqac_ia_sudoku_csp.Interfaces;
  3. namespace uqac_ia_sudoku_csp.Solver.NextValueChoosers
  4. {
  5. public class BasicValueChooser : INextValueChooser
  6. {
  7. public void SelectVariable(Board board, out int x, out int y, IList<IConstraint> constraints)
  8. {
  9. for (var xx = 0; xx < board.Size; ++xx)
  10. {
  11. for (var yy = 0; yy < board.Size; ++yy)
  12. {
  13. if (board.GetNumber(xx, yy) == null)
  14. {
  15. x = xx;
  16. y = yy;
  17. return;
  18. }
  19. }
  20. }
  21. x = -1;
  22. y = -1;
  23. }
  24. }
  25. }