Exemplo n.º 1
0
        private void RollDiceButton_Click(object sender, EventArgs e)
        {
            try
            {
                this.world.rollDice();
                this.updateResourceLabels();
                int roll = this.world.getRollNumber();
                this.RollNumberLabel.Text = roll.ToString();
                if (roll == 7)
                {
                    removeRobberText();

                    checkRemoveHalf();

                    this.world.setPlaceRobber(true);
                    RobberForm myForm = new RobberForm(this.world, this);
                    myForm.Show();
                }
            }
            catch (ArgumentException ex)
            {
                DialogResult num = MessageBox.Show(ex.Message,
                    rm.GetString(language + "InsufficientResources"),
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Exclamation);
            }
        }
Exemplo n.º 2
0
 private void KnightsDevCardLabel_Click(object sender, EventArgs e)
 {
     try
     {
         this.world.currentPlayer.playDevCard("knight", null, null);
         removeRobberText();
         this.world.setPlaceRobber(true);
         RobberForm myForm = new RobberForm(this.world, this);
         myForm.Show();
         this.updateDevelopmentCards();
     }
     catch (ArgumentException ex)
     {
     }
 }