public Egg(MotherNature.AntTypes t, Point loc, Queen mother) { id = ++lastid; type = t; name = mother.Colony.GetType().Name + this.GetType().Name + id; location = loc; certificate = mother.Colony.World().GetEggCertificate(name); rot = MotherNature.alea.Next(0, 360); this.mother = mother; }
protected bool LayEgg(MotherNature.AntTypes typ, System.Drawing.Point loc) { if (!ActionAllowed()) { return(false); // already did something } if (!Helpers.IsInPolygon(MyColony.Hill, loc)) { return(false); // can't lay an egg outside the hill } if (Helpers.Distance(SDLocation, loc) > Colony.CRIB_SIZE) { return(false); // queen cannot throw an egg !! } MyColony.StoreEggInNursery(new Egg(typ, loc, this, INITIAL_MATURITY)); energy -= MotherNature.COST_OF_LAYING_AN_EGG; return(true); }
public bool LayEgg(MotherNature.AntTypes typ, System.Drawing.Point loc, Queen queen) { return(LayEgg(typ, loc)); }
public Egg(MotherNature.AntTypes t, Point location, Queen mother, int mat) : this(t, location, mother) { maturity = mat; }