示例#1
0
 /// <summary>
 /// Prüft ob eine Ameise ein Obsstück sieht.
 /// </summary>
 /// <param name="ameise">betroffene Ameise</param>
 private void ameiseUndObst(CoreAnt ameise)
 {
     for (int i = 0; i < Playground.Fruits.Count; i++)
     {
         CoreFruit obst       = Playground.Fruits[i];
         int       entfernung = CoreCoordinate.BestimmeEntfernungI(ameise.CoordinateBase, obst.CoordinateBase);
         if (ameise.ZielBase != obst && entfernung <= ameise.SichtweiteI)
         {
             PlayerCall.Spots(ameise, obst);
         }
     }
 }
示例#2
0
 /// <summary>
 /// Prüft ob eine Ameise einen Zuckerhaufen sieht.
 /// </summary>
 /// <param name="ant">betroffene Ameise</param>
 private void ameiseUndZucker(CoreAnt ant)
 {
     for (int i = 0; i < Playground.SugarHills.Count; i++)
     {
         CoreSugar sugar      = Playground.SugarHills[i];
         int       entfernung = CoreCoordinate.BestimmeEntfernungI(ant.CoordinateBase, sugar.CoordinateBase);
         if (ant.ZielBase != sugar && entfernung <= ant.SichtweiteI)
         {
             PlayerCall.Spots(ant, sugar);
         }
     }
 }