예제 #1
0
        static void Main(string[] args)
        {
            Coach c1 = new Coach("Coach1", GetRandomNumber());
            Team  t1 = new Team("Барселона", c1);

            string[] names = { "Jordano", "Bruno", "Adriano", "Celentano", "Milo", "Andrew", "John", "Greg", "Random", "Postal", "Dude", "Wafler", "Pencilhead", "Dereck", "Dwayne", "Timoty", "I don't", "like", "football", "Elvis" };
            for (int i = 0; i < 20; i++)
            {
                Player p = new Player(names[i], GetRandomAge(), GetRandomNumber());
                t1.AddPlayer(p);
            }

            Coach c2 = new Coach("Coach2", GetRandomNumber());
            Team  t2 = new Team("Нижние Васюки", c2);

            string[] names2 = { "Вася", "Петя", "Вова", "Жора", "Дима", "Егор", "Виталя", "Гена", "Эдуард", "Гоги", "Шмоги", "Исаак", "Дед Иван", "Петрович", "Дранкель", "Жранкель", "Гер Майор", "Сергей", "Леонид", "Баба Варя" };
            for (int i = 0; i < 20; i++)
            {
                Player p = new Player(names[i], GetRandomAge(), GetRandomNumber());
                t2.AddPlayer(p);
            }

            JuniorDotNet jdn = new JuniorDotNet();
            Judge        j   = new Judge("Prodajniy", Pref(), jdn);
            Game         g   = new Game(t1, t2, j);

            g.go   += j.Goal;
            g.viol += j.Violation;
            g.Play();

            //t1.InAlphOrder();
            //t1.OlderThanThirty();


            Console.ReadLine();
        }
예제 #2
0
 public Team(string name, Coach c)
 {
     Name    = name;
     Coach   = c;
     players = new List <Player>();
 }