예제 #1
0
            internal List <int> getGuessOptions(SudokuField field)
            {
                List <int> options = (List <int>)field.GetNumbers();

                options.RemoveAll(number => failedGuesses.Contains(number));
                return(options);
            }
예제 #2
0
 private SudokuField[,] BoardWidthHeight()
 {
     SudokuField[,] board = new SudokuField[boardProperties[boardProperty].BoardWidth, boardProperties[boardProperty].BoardHeight];
     for (int x = 0; x < boardProperties[boardProperty].BoardWidth; x++)
     {
         for (int y = 0; y < boardProperties[boardProperty].BoardHeight; y++)
         {
             board[x, y] = createSudokuField(boardProperties[boardProperty].MinNumber, boardProperties[boardProperty].MaxNumber);
         }
     }
     return(board);
 }
예제 #3
0
 private SudokuField[,] BoardIntToField(int[][] field)
 {
     SudokuField[,] board = new SudokuField[boardProperties[boardProperty].BoardWidth, boardProperties[boardProperty].BoardHeight];
     for (int x = 0; x < field.Length; x++)
     {
         for (int y = 0; y < field[0].Length; y++)
         {
             if (field[x][y] == 0)
             {
                 board[x, y] = createSudokuField(boardProperties[boardProperty].MinNumber, boardProperties[boardProperty].MaxNumber);
             }
             else
             {
                 board[x, y] = createSudokuFieldWithSetNumber(boardProperties[boardProperty].MinNumber, boardProperties[boardProperty].MaxNumber, field[x][y]);
             }
         }
     }
     return(board);
 }