예제 #1
0
파일: task5.cs 프로젝트: kolombet/labs
    static void Main()
    {
        ArrayList cr = new ArrayList();
        Field fi = new Field();

        cr.Add(new Creature("Дед", 5));
        cr.Add(new Creature("Бабка", 5));
        cr.Add(new Creature("Внучка", 4));
        cr.Add(new Creature("Жучка", 3));
        cr.Add(new Creature("Кошка", 2));
        cr.Add(new Creature("Мышка", 1));
        cr.Add(new Creature("anded", 50));

        foreach (Creature c in cr) {
            fi.addCreature(c);
            fi.startWork();
        }
    }
예제 #2
0
파일: task6.cs 프로젝트: kolombet/labs
    static void Main()
    {
        ArrayList cr = new ArrayList();
        Field fi = new Field();

        cr.Add(new Creature("Дед", "Дедку", 3, Creature.MALE));
        cr.Add(new Creature("Бабка", "Бабку", 5, Creature.FEMALE));
        cr.Add(new Creature("Внучка", "Внучку", 4, Creature.FEMALE));
        cr.Add(new Creature("Жучка", "Жучку", 3, Creature.FEMALE));
        cr.Add(new Creature("Кошка", "Кошку", 2, Creature.FEMALE));
        cr.Add(new Creature("Мышка", "Мышку", 1, Creature.FEMALE));
        cr.Add(new Creature("Петя", "Петю", 1, Creature.MALE));
        cr.Add(new Creature("Вася", "Васю", 1, Creature.MALE));
        cr.Add(new Creature("Надя", "Надю", 1, Creature.MALE));
        cr.Add(new Creature("Миша", "Мишу", 1, Creature.MALE));
        cr.Add(new Creature("Монстр", "Монстра", 100, Creature.MALE));

        foreach (Creature c in cr) {
            fi.addCreature(c);
            fi.startWork();
        }

        Console.ReadLine();
    }