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; } }
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(); } } }
public void ClearBet() { bet = new Bet(0, null); myBetLabel.Text = Name + " has no bet yet."; UpdateRadioButton(); }
public void Collect(int Winner) { MyBet = null; UpdateLabels(); }
public Guy() { MyBet = new Bet(); UpdateLabels(); }