public GameWindow() { grid = SudokuGenerator.Generate(SudokuGrid.Difficulty.Easy); InitWindow(); InitCells(grid); currentMenuItem = MenuItem.None; currentMenuItemIndex = 0; gameIsRunning = true; }
private void NewGame(SudokuGrid.Difficulty difficulty) { grid = SudokuGenerator.Generate(difficulty); for (int row = 0; row < 9; row++) { for (int col = 0; col < 9; col++) { cells[row, col].RefreshValues(grid[row, col], grid.IsEditable(row, col)); } } RefreshCellValues(); }