Пример #1
0
 public SudokuSolver(int[,] array)
 {
     // since arrays are passed by reference
     m_sudokuTable = new int[9, 9];
     Array.Copy(array, m_sudokuTable, array.Length);
     Debug.Assert(m_sudokuTable.GetLength(0) == 9);
     Debug.Assert(m_sudokuTable.GetLength(1) == 9);
     m_rowRules    = new MyBitArray[9];
     m_columnRules = new MyBitArray[9];
     m_blockRules  = new MyBitArray[9];
     for (int i = 0; i < 9; i++)
     {
         m_rowRules[i]    = new MyBitArray(9);
         m_columnRules[i] = new MyBitArray(9);
         m_blockRules[i]  = new MyBitArray(9);
     }
     m_emptyCells = new List <CellFilling>();
     LoadSudoku();
 }
Пример #2
0
 public CellFilling(Point coords, MyBitArray options)
 {
     Coords         = coords;
     m_options      = options;
     m_optionsCount = options.GetFalseIndexes().Count;
 }
Пример #3
0
 public CellFilling(Point coords)
 {
     Coords         = coords;
     m_options      = new MyBitArray(9);
     m_optionsCount = 9;
 }