Exemplo n.º 1
0
 public AstroAntManager(string[] firstGroup, string[] secondGroup) : this()
 {
     for (int i = 0; i < firstGroup.Length; i++)
     {
         var astroAnt = new AstroAnt(firstGroup[i], firstGroupIndex, firstGroup.Length - i);
         FirstGroup.Add(astroAnt);
     }
     for (int i = 0; i < secondGroup.Length; i++)
     {
         var astroAnt = new AstroAnt(secondGroup[i], secondGroupIndex, i + 1);
         SecondGroup.Add(astroAnt);
     }
     OverstepStatus.AddRange(FirstGroup);
     OverstepStatus.AddRange(SecondGroup);
 }
Exemplo n.º 2
0
        public AstroAntManager(int firstGroupSize, int secondGroupSize) : this()
        {
            for (int i = 0; i < firstGroupSize; i++)
            {
                var ant = new AstroAnt("green" + (i + 1), firstGroupIndex, i + 1);
                FirstGroup.Add(ant);
            }
            FirstGroup = FirstGroup.OrderByDescending(a => a.GroupPosition).ToList();

            for (int i = 0; i < secondGroupSize; i++)
            {
                var ant = new AstroAnt("blue" + (i + 1), secondGroupIndex, i + 1);
                SecondGroup.Add(ant);
            }
            SecondGroup = SecondGroup.OrderBy(a => a.GroupPosition).ToList();
            OverstepStatus.AddRange(FirstGroup);
            OverstepStatus.AddRange(SecondGroup);
        }