Ejemplo n.º 1
0
        //Liste Racer befüllen
        private List<Racer> initRacers()
        {
            //Langer Weg zum befüllen
            var r1 = new Racer { name = "Alien", maxSpeed = 9, minSpeed = 3};
            var r2 = new Racer { name = "Sonic", maxSpeed = 30, minSpeed = 9 };
            var r3 = new Racer { name = "Pikachu", maxSpeed = 11, minSpeed = 4 };
            var r4 = new Racer { name = "Ninja", maxSpeed = 14, minSpeed = 6 };
            var r5 = new Racer { name = "Zombie", maxSpeed = 4, minSpeed = 1 };

            //Erstellte Elemente der Liste hinzufügen
            racersList.Add(r1);
            racersList.Add(r2);
            racersList.Add(r3);
            racersList.Add(r4);
            racersList.Add(r5);

            return racersList;
        }