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()); }
public void Eat(ILifeForm target) { Hunger += 20 * target.Size; Grow((int)Math.Ceiling(1.1 * target.Size / Size)); target.Die(DyingReason.Eaten); }
public bool IsAlive(ILifeForm ogr, ILifeForm ciclop) { ogr.IsAlive(); ciclop.IsAlive(); return(false); }
public void IsAlive(ILifeForm warrior) { warrior.IsAlive(); }