Exemple #1
0
 /// <summary>
 /// Initialize the Pig Game Form.
 /// </summary>
 public Pig_Game_Form()
 {
     InitializeComponent();
     Pig_Single_Die_Game.SetUpGame();
     pigLabelWhosTurnTo.Text  = Pig_Single_Die_Game.GetFirstPlayersName();
     Pig_rollOrHoldLabel.Text = "Roll die";
     holdButton.Enabled       = false;
 }
Exemple #2
0
 private void YesRadio_CheckedChanged(object sender, EventArgs e)
 {
     Pig_Single_Die_Game.SetUpGame();    // Reset the game
     RollBtn.Enabled      = true;        // Enable the roll button again
     GameTerminal.Enabled = false;       // Disable the play again choice
     FormUpdate();
     yesButton.Checked = false;
 }
Exemple #3
0
        }//end of HoldButton_Click

        /// <summary>
        /// Setup game, updates WhoseTurnToLabel, updates textbox, unchecks YesOption button
        /// Disables groupbox.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void YesOption_CheckedChanged(object sender, EventArgs e)
        {
            Pig_Single_Die_Game.SetUpGame();
            WhoseTurnToLabel.Text       = "Player 1";
            PlayerOneTotalTextBox.Text  = "";
            PlayerTwoTotalTextBox.Text  = "";
            YesOption.Checked           = false;
            AnotherGameGroupBox.Enabled = false;
        }//end of YesOption_Checked
        public PigGameForm()
        {
            InitializeComponent();

            Pig_Single_Die_Game.SetUpGame();

            SetDieImage();

            lblWhoseTurn.Text = Pig_Single_Die_Game.GetFirstPLayersName().ToString();

            SetRollMessage();

            SetPlayerScores();
        }
Exemple #5
0
 public Pig_Game_Form()
 {
     InitializeComponent();
     Pig_Single_Die_Game.SetUpGame();
     FormUpdate();
 }
Exemple #6
0
 public Pig_Game_Form()
 {
     InitializeComponent();
     Pig_Single_Die_Game.SetUpGame();
     PictureBox.Image = Images.GetDieImage(Pig_Single_Die_Game.GetFaceValue());
 }