Package fr.formiko.formiko.interfaces
Class ChasseGranivore
java.lang.Object
fr.formiko.formiko.interfaces.ChasseGranivore
- All Implemented Interfaces:
Chasse
,Serializable
Ant implementation.
Allow an ant to do hunt
Ant are able to see other ObjetSurCarteAId as Creature at 1 Case of distance.
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Break the transported seed.boolean
Return true if Creature can break the transported seed.boolean
Return true if Creature can eat the transported seed.boolean
boolean
Check if can hunt.boolean
actions during hunt.boolean
collect seeds.private boolean
void
eatSeed()
Eat the transported seed.private GGraine
getProie()
fined a prey.boolean
Return true if there is prey on same square.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fr.formiko.formiko.interfaces.Chasse
setActionMoins
-
Field Details
-
c
-
-
Constructor Details
-
ChasseGranivore
-
-
Method Details
-
chasser
collect seeds.
Ant search a seed. If it see a seed on the same Case it take it. If it see a seed on an other Case it goes to the Case.
It can choose the first 1 or the better 1 depending on the difficulty. -
chasse
actions during hunt.
Ant search a Seed in the same Case
It can choose the first 1 or the better 1 depending on the difficulty. -
getProie
fined a prey. -
canHuntMore
public boolean canHuntMore() -
canHuntMore
Check if can hunt.
It should use Chasse.canHuntMore & specifics conditions for granivore species.- Specified by:
canHuntMore
in interfaceChasse
-
eatIfNeed
private boolean eatIfNeed() -
havePreyOnSameSquare
Return true if there is prey on same square.- Specified by:
havePreyOnSameSquare
in interfaceChasse
-
eatSeed
public void eatSeed()Eat the transported seed. -
breakSeed
public void breakSeed()Break the transported seed. -
canEatSeed
public boolean canEatSeed()Return true if Creature can eat the transported seed.- Specified by:
canEatSeed
in interfaceChasse
-
canBreakSeed
public boolean canBreakSeed()Return true if Creature can break the transported seed.- Specified by:
canBreakSeed
in interfaceChasse
-