Exemplo n.º 1
0
        private void DrawingPanel_Paint(object sender, PaintEventArgs e)
        {
            DrawTable();
            var board = new SudokuLogic.Board();

            board.GetField(3, 4).SetValue(3);
            board.GetField(8, 8).SetValue(1);
            board.GetField(3, 3).SetValue(4);
            SudokuLogic.Logic.EliminatePossibilities(board);
            SudokuLogic.Logic.FillTheFields(board);
            DrawValuesAndPossibilities(board);
        }
Exemplo n.º 2
0
 public void DrawValuesAndPossibilities(SudokuLogic.Board board)
 {
     foreach (var field in board.AllFields)
     {
         if (field.HasValue())
         {
             DrawNumber(field);
         }
         else
         {
             DrawPossibilities(field);
         }
     }
 }