private void btnReshuffle_Click(object sender, EventArgs e) { game.GetBoard().Shuffle(); game.RefreshBoardAndClearHidden(); game.DiluteBoard(Settings.Rows, Settings.Cols); game.Hide(); int hiddenCount = game.GetBoard().CountHidden(); lblHiddenCount.Text = "Hidden: " + hiddenCount.ToString(); foreach (Control c in board.Controls) { if (c.BackColor == Color.Red) { c.BackColor = Color.LightGray; } } }
public GameForm() { InitializeComponent(); game = new Sudoku(this, board, Difficulty.Easy); game.Hide(); StartPosition = FormStartPosition.CenterScreen; btnDisplayAnswers.Text = "Display"; int hiddenCount = game.GetBoard().CountHidden(); lblHiddenCount.Text = $"Hidden: {hiddenCount.ToString()}"; AddComboBoxItems(); cmbDifficulties.SelectedIndex = 0; MaximizeBox = false; FormBorderStyle = FormBorderStyle.FixedSingle; }