private void YesRadio_CheckedChanged(object sender, EventArgs e) { Pig_Double_Dice_Game.SetUpGame(); // Reset the game RollBtn.Enabled = true; // Enable the roll button again GameTerminal.Enabled = false; // Disable the play again choice UpdateForm(); YesButton.Checked = false; }
}//end of HoldButton /// <summary> /// Setup game, updates WhoseTurnToLabel, updates textbox, unchecks YesOption button /// Disables groupbox. /// </summary> private void YesOption_CheckedChanged(object sender, EventArgs e) { Pig_Double_Dice_Game.SetUpGame(); PlayerOneTotalTextBox.Text = ""; PlayerTwoTotalTextBox.Text = ""; WhoseTurnToLabel.Text = "Player 1"; YesOption.Checked = false; AnotherGameGroupBox.Enabled = false; }//end of YesOption
public Pig_With_Two_Dice_Form() { InitializeComponent(); PictureBox[] pictureBoxes; pictureBoxes = new PictureBox[Pig_Double_Dice_Game.NUM_OF_PLAYERS] { PictureBox, PictureBox2 }; Pig_Double_Dice_Game.SetUpGame(); }
/// <summary> /// Initialise Form /// </summary> public Pig_with_Two_Dice_Form() { InitializeComponent(); Pig_Double_Dice_Game.SetUpGame(); UpdateForm(); }