Class TourReine

java.lang.Object
fr.formiko.formiko.interfaces.TourFourmi
fr.formiko.formiko.interfaces.TourReine
All Implemented Interfaces:
Tour, Serializable

public class TourReine extends TourFourmi implements Serializable, Tour
Ant implementation.
Allow an ant to play a turn
Author:
Hydrolien
See Also:
  • Constructor Details

    • TourReine

      public TourReine()
  • Method Details

    • tour

      public void tour()
      Do turn actions for a queen ant.
      • 1a the ant try to survive.
      • If the ant is alone, it try to get more food.
      • If some other ant (of the same anthill) haven't played yet, it wait that they have. This allow the queen to lay more egg only if every other ant are clean and well feed.
      • Then it help any friendly ant in the anthill place.
      • Finaly it lay more egg.
      Overrides:
      tour in class TourFourmi
    • needToWaitToLetNonQueenAntPlay

      public boolean needToWaitToLetNonQueenAntPlay()
      Wait to be the last ant to play.
      The queen whait util all the ant that did'nt have this implementation have played
    • haveSomeHelp

      public boolean haveSomeHelp()
      Check if this ant have some help from other ant of the same anthill.
    • needToTakeCareOfBrood

      public boolean needToTakeCareOfBrood()
      Check if this ant need to feed/protect/clean some egg, larva or nympha.
    • lay

      public void lay()
      Lay egg as a queen ant.
      If the queen have no help from al list 1 ally imago ant, it don't lay more than 1 egg.