Beispiel #1
0
 public void ClearBet()
 {
     MyBet = new Bet()
     {
         Bettor = this
     };
 }
Beispiel #2
0
 public void ClearBet()
 {
     if (MyBet == null)
     {
         MyBet = new Bet() { Bettor = this };
     }
     MyBet.Amount = 0;
 }
Beispiel #3
0
 public Guy(string name, Bet bet, int cash, RadioButton button, Label label)
 {
     this.name = name;
     this.my_bet = bet;
     this.cash = cash;
     this.my_radio = button;
     this.my_label = label;
 }
Beispiel #4
0
 public Guy(string aName, RadioButton aRadioButton, int someCash, Label aLabel)
 {
     Name = aName;
     MyBet = new Bet(0,0,this);
     Cash = someCash;
     MyRadioButton = aRadioButton;
     MyLabel = aLabel;
     UpdateLabels();
 }
Beispiel #5
0
 public bool PlaceBet(int BetAmount,int DogToWin)
 {
     if (BetAmount <= Money)
     {
         MyBet = new Bet() { Amount = BetAmount, Dog = DogToWin, Bettor = this };
         return true;
     }
     else return false;
 }
Beispiel #6
0
 public bool placeBet(int bet_amount, int on_dog)
 {
     bool made_bet = false;
     if (bet_amount <= this.cash)
     {
         this.my_bet = new Bet(bet_amount, on_dog, this);
         made_bet = true;
     }
     return made_bet;
 }
Beispiel #7
0
 /* 1. Place new bet.
  * 2. Store in MyBet field.
  * 3. Return true if Guy had enough money to bet.
  */
 public bool PlaceBet(int Amount, int Dog)
 {
     if (Amount <= Cash)
     {
         MyBet = new Bet(Amount, Dog, this);
         return true;
     }
     else
         return false;
 }
Beispiel #8
0
 public bool PlaceBet(int BetAmount, int DogToWin)
 {
     if (BetAmount <= Cash && DogToWin <= 4 && DogToWin > 0)
     {
         MyBet = new Bet() { Amount = BetAmount, Dog = DogToWin, Bettor = this };
         UpdateLabels();
         return true;
     }
     else
     {
         return false;
     }
 }
Beispiel #9
0
 public bool PlaceBet(int amount, int dog)
 {
     if (amount < Cash)
     {
         myBet = new Bet()
             {
                 Dog = dog,
                 Amount = amount,
                 Bettor = this
             };
         return true;
     }
     else return false;
 }
Beispiel #10
0
 public bool PlaceBet(int BetAmount, int DogToWin)
 {
     if (BetAmount <= Cash)
     {
         MyBet = new Bet() {Bettor = this, Amount = BetAmount, Dog = DogToWin};
         UpdateLabels();
         return true;
     }
     else
     {
         UpdateLabels();
         return false;
     }
 }
Beispiel #11
0
 public bool PlaceBet(int BetAmount, int DogToWin)
 {
     // Place a new bet and store it in my bet field
     // Return true if the guy had enough money to bet
     if (Cash>=5 && Cash>=BetAmount)
     {
         MyBet = new Bet() { Amount = BetAmount, Dog = DogToWin, Bettor = this };
         UpdateLabels();
         return true;
     }
     else
     {
         return false;
     }
 }
Beispiel #12
0
 public bool PlaceBet(int Amount, Greyhound Dog)
 {
     //check to see if we have enough cash first
     if (Amount <= Cash)
     {
         //create the bet, assign the amount, dog and who placed the bet. Finish up by updating labels
         MyBet = new Bet();
         MyBet.Amount = Amount;
         MyBet.Dog = Dog;
         MyBet.Bettor = this;
         UpdateLabels();
         return (true);
     }
     else
     {
         //sorry, you are broke
         return (false);
     }
 }
Beispiel #13
0
 public void ClearBet()
 {
     MyBet = null;
 }
Beispiel #14
0
 public void ClearBet()
 {
     //reset my bet so its 0
     MyBet = null;
     UpdateLabels();
 }
Beispiel #15
0
 public void ClearBet()
 {
     //reset my bet so its 0
     MyBet = null;
     UpdateLabels();
 }
Beispiel #16
0
 public void ClearBet()
 {
     myBet = null;
 }
Beispiel #17
0
 public void clearBet()
 {
     this.my_bet = null;
 }
Beispiel #18
0
        public string Name; // The guy's name

        #endregion Fields

        #region Methods

        public void ClearBet()
        {
            // Reset my bet so it's zero
            MyBet = null;
            UpdateLabels();
        }