Package fr.formiko.formiko.interfaces
Class NetoyerFourmi
java.lang.Object
fr.formiko.formiko.interfaces.NetoyerFourmi
- All Implemented Interfaces:
Netoyer
,Serializable
Ant implementation.
Allow an ant to clean itself or an other Creature
Allow an ant to clean itself or an other Creature
- Author:
- Hydrolien
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int[]
get non-100% clean ant sort by cleaning level.private int[]
get non-100% clean ant.int
get number of non-100% clean ant.void
A non-AI ant want to clean.void
An ant clean a Creature.private boolean
Let a player choose the ant that he want to clean.boolean
An AI ant want to clean.private void
do the real cleaning action between cible ant net.
-
Field Details
-
cible
-
net
-
-
Constructor Details
-
NetoyerFourmi
public NetoyerFourmi()
-
-
Method Details
-
netoyerIa
An AI ant want to clean. -
netoyer
A non-AI ant want to clean. -
netoyer
An ant clean a Creature. -
getNombreDeCreatureANetoyer
get number of non-100% clean ant.- Specified by:
getNombreDeCreatureANetoyer
in interfaceNetoyer
- Parameters:
c
- The cleaning ant.- Returns:
- the number of non-100% clean ant.
-
netoyerChoix
private boolean netoyerChoix()Let a player choose the ant that he want to clean.- Returns:
- true if the player chose an ant to clean.
-
netoyerPrivate
private void netoyerPrivate()do the real cleaning action between cible ant net. -
getFourmiParOrdreDeSaletéSurLaCase
private int[] getFourmiParOrdreDeSaletéSurLaCase()get non-100% clean ant sort by cleaning level.- Returns:
- the non-100% clean ant sort by cleaning level on the same Case.
-
getFourmiPasPropre
private int[] getFourmiPasPropre()get non-100% clean ant.- Returns:
- the non-100% clean ant.
-