示例#1
0
文件: Sudoku.cs 项目: 3391916/Sudoku
        public Sudoku(List <SudokuCell> cells)
        {
            if (cells == null)
            {
                throw new ArgumentNullException("cells can't be equal to null");
            }

            _cells = cells;

            _sudokuSolver = ServiceLocator.Current.GetInstance <ISudokuSolver>();
            _sudokuComplexityEstimator = ServiceLocator.Current.GetInstance <ISudokuComplexityEstimator>();
            _sudokuDifficultyLevel     = _sudokuComplexityEstimator.EstimateComplexityLevel(this);
        }
示例#2
0
 public SimpleSudokuGenerator(ISudokuComplexityEstimator sudokuComplexityEstimator)
 {
     _sudokuComplexityEstimator = sudokuComplexityEstimator;
 }