Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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
Ejemplo n.º 4
0
        public PigGameForm()
        {
            InitializeComponent();

            Pig_Single_Die_Game.SetUpGame();

            SetDieImage();

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

            SetRollMessage();

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