private Action Maximize(Punter punter) { return(delegate() { nuAmount.Maximum = (decimal)punter.Cash; selected = punter; }); }
private void DrawPunter(Punter punter, Label wallet, Label amount, Label Cat) { amount.Text = punter.betAmount.ToString(); wallet.Text = punter.Cash.ToString(); try { Cat.Text = punter.betHound.name; } catch (NullReferenceException) { Cat.Text = "none"; } }
//setting the maxium amount to bet. private EventHandler setNumAmount(Punter punter) { return(delegate(object sender, EventArgs e) { var senderRadio = (RadioButton)sender; if (!senderRadio.Checked) { return; } Max = Maximize(punter); Max(); }); }
public Racing() { Hounds = new List <Greyhound>() { PinkHound, TealHound, BlueHound }; Joe = PunterFactory.ManufacturePunter(PunterEnum.Joe); Bob = PunterFactory.ManufacturePunter(PunterEnum.Bob); Alice = PunterFactory.ManufacturePunter(PunterEnum.Alice); Punters = new List <Punter>() { Joe, Bob, Alice }; }
public void Bet(HoundEnum hound, Punter punter, int amount) { punter.betAmount = amount; switch (hound) { case HoundEnum.Pink: punter.betHound = PinkHound; break; case HoundEnum.Teal: punter.betHound = TealHound; break; case HoundEnum.Blue: punter.betHound = BlueHound; break; } }