Exemple #1
0
        public bool PlaceBet(int Amount, int Dog)
        {
            MyBet = new Bet { Amount = Amount, Dog = Dog, Bettor = this };

            if (Amount <= Cash)
            {

                return true;
            }
            else
            {
                MessageBox.Show("You Don't have enough money");
                return false;
            }
        }
Exemple #2
0
 public void ClearBet()
 {
     MyBet = null;
 }
 private void btnBet_Click(object sender, EventArgs e)
 {
     if (index != -1)
     {
         bet = new Bet
         {
             Bettor = guys[index],
             Amount = (int)amount.Value,
             Dog = (int)numDog.Value
         };
         guys[index].MyBet = bet;
         bool check = guys[index].PlaceBet(bet.Amount, bet.Dog);
         if (check == false)
         {
             if (guys[index].Cash < (int)amount.Minimum)
             {
                 guys[index].MyRadioButton.Enabled = false;
             }
             MessageBox.Show(guys[index].Name + " don't have enough money");
         }
         else
         {
             guys[index].UpdateRadio();
             bet.UpdateLabel();
         }
     }
 }
Exemple #4
0
 public void ClearBet()
 {
     bet             = new Bet(0, null);
     myBetLabel.Text = Name + " has no bet yet.";
     UpdateRadioButton();
 }
Exemple #5
0
 public void Collect(int Winner)
 {
     MyBet = null;
     UpdateLabels();
 }
Exemple #6
0
 public void ClearBet()
 {
     MyBet = null;
 }
Exemple #7
0
 public Guy()
 {
     MyBet = new Bet();
     UpdateLabels();
 }
Exemple #8
0
 public void Collect(int Winner)
 {
     MyBet = null;
     UpdateLabels();
 }
Exemple #9
0
 public Guy()
 {
     MyBet = new Bet();
     UpdateLabels();
 }