Class ChasseInsectivore

java.lang.Object
fr.formiko.formiko.interfaces.ChasseInsectivore
All Implemented Interfaces:
Chasse, Serializable

public class ChasseInsectivore extends Object implements Serializable, Chasse
Ant implementation.
Allow an ant to do hunt
Ant are able to see other ObjetSurCarteAId as Creature at 1 Case of distance.
Author:
Hydrolien
See Also:
  • Field Details

  • Constructor Details

    • ChasseInsectivore

      public ChasseInsectivore()
  • Method Details

    • setC

      public void setC(Creature cTemp)
    • chasser

      public boolean chasser(Creature c, int direction)
      try to hunt or moove.
      Specified by:
      chasser in interface Chasse
      Parameters:
      c - The hunting Creature.
      direction - The direction were the Creature will go if any Prey is visible. return true if c can hunt more.
    • chasse

      public boolean chasse(Creature c)
      actions during hunt.
      An Ant kill an Insect in the same Case
      It can choose the first 1 or the better 1 depending on the difficulty.
      Specified by:
      chasse in interface Chasse
      Parameters:
      c - The hunting Creature. return true if c can hunt more.
    • getProie

      public GInsecte getProie()
      fined a prey.
    • tuer

      public boolean tuer(Insecte insecteTue)
      kill during hunt.
      An Ant kill an Insect
      Parameters:
      insecteTue - The insect that will die.
    • depecer

      public boolean depecer(Insecte insecteTue)
      Butcher during hunt.
      An Ant kill an Insect
      Parameters:
      insecteTue - The died Insect.
    • canHuntMore

      public boolean canHuntMore()
    • havePreyOnSameSquare

      public boolean havePreyOnSameSquare(Creature c)
      Return true if there is prey on same square.
      Specified by:
      havePreyOnSameSquare in interface Chasse