Beispiel #1
0
 public static double DistanceSquared(ILifeForm a, ILifeForm b)
 {
     if (a == null || b == null)
         return 0;
     return (b.GetX() - a.GetX()) * (b.GetX() - a.GetX()) + (b.GetY() - a.GetY()) * (b.GetY() - a.GetY());
 }
Beispiel #2
0
 public void Eat(ILifeForm target)
 {
     Hunger += 20 * target.Size;
     Grow((int)Math.Ceiling(1.1 * target.Size / Size));
     target.Die(DyingReason.Eaten);
 }
Beispiel #3
0
 public bool IsAlive(ILifeForm ogr, ILifeForm ciclop)
 {
     ogr.IsAlive();
     ciclop.IsAlive();
     return(false);
 }
Beispiel #4
0
 public void IsAlive(ILifeForm warrior)
 {
     warrior.IsAlive();
 }
Beispiel #5
0
 public void Eat(ILifeForm target)
 {
     Hunger += 20 * target.Size;
     Grow((int)Math.Ceiling(1.1 * target.Size / Size));
     target.Die(DyingReason.Eaten);
 }