Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace BetDogsHeadFirst
- {
- public class Guy
- {
- public string name;
- public Bet myBet;
- public int cash;
- public RadioButton myRadioButton;
- public Label myLabel;
- public void UpdateLabels()
- {
- myRadioButton.Text = name + " has " + cash + " bucks.";
- if(myBet==null)
- {
- myLabel.Text = name + " hasn't place a bet";
- }
- else
- {
- myLabel.Text = myBet.GetDescription();
- }
- }
- public void ResetBet()
- {
- myBet.amount = 0;
- }
- public bool PlaceBet(int betAmount,int DogToWin)
- {
- if (cash >= betAmount)
- {
- myBet = new Bet() { amount = betAmount, dog = DogToWin, bettor = this };
- return true;
- }
- else
- return false;
- }
- public void Collect(int winner)
- {
- cash += myBet.PayOut(winner);
- }
- }
- }
Add Comment
Please, Sign In to add comment