Example #1
0
        //Vytvoří nový SudokuBoard dle zadané obtížnosti
        public static SudokuBoard Create(int difficulty)
        {
            SudokuBoard board = new SudokuBoard();
            int         number;

            switch (difficulty)
            {
            case 1:
            default:
                number = 28;
                break;

            case 2:
                number = 32;
                break;

            case 3:
                number = 38;
                break;

            case 4:
                number = 42;
                break;
            }

            board = board.GetSolution().Clone();

            board.CutCells(number);
            return(board);
        }