Ejemplo n.º 1
0
 public bool PlaceBet(int BetAmount, string AvengerToWin, decimal Test)
 {
     this.MyBet = new Bets()
     {
         Amount = BetAmount, Avenger = AvengerToWin, Bettor = this, odds = Test
     };
     if (BetAmount <= Cash)
     {
         MyLabel2.Text = this.Name + " bets " + BetAmount + " dollars on " + AvengerToWin;
         this.UpdateLabels();
         return(true);
     }
     else
     {
         MessageBox.Show(Name + " does not have enough to cover that bet ");
         this.MyBet = null;
         return(false);
     }
 }
Ejemplo n.º 2
0
 public void ClearBet()
 {
     MyBet         = null;
     MyLabel2.Text = Name + " hasn't placed a bet";
 }