public void InitializeBettors() { fJoe = new Bettor("Joe", 50, JoeRadioButton, JoeLabel); fBob = new Bettor("Bob", 75, BobRadioButton, BobLabel); fAlan = new Bettor("Alan", 45, AlanRadioButton, AlanLabel); fAllBettors = new[] { fJoe, fBob, fAlan }; }
public void UpdateBettingParlour() { for (int i = 0; i < NumBettors; i++) { // Update his label fAllBettors[i].MyRadioButton.Text = fAllBettors[i].Name + ": has " + fAllBettors[i].Cash + " cash."; // Update ActiveBettorLabel if required if (fAllBettors[i].MyRadioButton.Checked) { fActiveBettor = fAllBettors[i]; ActiveBettorLabel.Text = fActiveBettor.Name; } } }