Exemplo n.º 1
0
        public void SetupRace()
        {
            minimumBet.Text = string.Format("Minumum bet {0:c}", (int)BetAmount.Minimum);

            int startingPosition = dogPictureBox1.Right - finalPictureBox.Left;
            int raceTrackLength = finalPictureBox.Size.Width;

            dogs[0] = new Dog()
            {
                MyPicture = dogPictureBox1,
                RacetrackLength = raceTrackLength,
                StartingPosition = startingPosition
            };

            dogs[1] = new Dog()
            {
                MyPicture = dogPictureBox2,
                RacetrackLength = raceTrackLength,
                StartingPosition = startingPosition
            };

            dogs[2] = new Dog()
            {
                MyPicture = dogPictureBox3,
                RacetrackLength = raceTrackLength,
                StartingPosition = startingPosition
            };

            dogs[3] = new Dog()
            {
                MyPicture = dogPictureBox4,
                RacetrackLength = raceTrackLength,
                StartingPosition = startingPosition
            };

            players[0] = new Player("Mike", null, 50, player1radioButton, player1Label);
            players[1] = new Player("Poola", null, 75, player2radioButton, player2Label);
            players[2] = new Player("Zdzislaw", null, 120, player3radioButton, player3Label);

            foreach (Player player in players)
            {
                player.UpdateLabels();
            }
        }
Exemplo n.º 2
0
 public Bet(int Amount, int Dog, Player Player)
 {
     this.Amount = Amount;
     this.Dog = Dog;
     this.Player = Player;
 }