public void SetupRaceTrack() { bett[0] = new Bettor() { myPictureBox = carPB1, starting = raceTrackPictureBox.Left, raceLength = raceTrackPictureBox.Width - carPB1.Width, rando = myRandomizer }; bett[1] = new Bettor() { myPictureBox = carPB2, starting = raceTrackPictureBox.Left, raceLength = raceTrackPictureBox.Width - carPB2.Width, rando = myRandomizer }; bett[2] = new Bettor() { myPictureBox = carPb3, starting = raceTrackPictureBox.Left, raceLength = raceTrackPictureBox.Width - carPb3.Width, rando = myRandomizer }; bett[3] = new Bettor() { myPictureBox = carpb4, starting = raceTrackPictureBox.Left, raceLength = raceTrackPictureBox.Width - carpb4.Width, rando = myRandomizer }; racers[0] = new racer("gill", 50, playerrb1, player1Label);//it is setting the player name and their money racers[1] = new racer("askarn", 50, playerrb2, player2Label); racers[2] = new racer("simer", 50, playerrb3, player3Label); foreach (var guy in racers) { guy.Bets(0, 0); guy.UpdateLb(); } minimumBetLabel.Text = "Minimum bet: " + miniBet + " bucks"; betupdown.Minimum = miniBet; }
public Bet(racer bet2) { bettor = bet2; }