Package fr.formiko.formiko
Class Fourmiliere
java.lang.Object
fr.formiko.formiko.Fourmiliere
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate CCase
Place on the mapprivate GCreature
Liste of the Creature own by the Fourmiliereprivate GGraine
Liste of the Graine own by the Fourmiliereprivate fr.formiko.usual.structures.listes.GGInt
Liste of the Scores turn by turn of the Fourmiliereprivate final int
Unique id of the Fourmiliere.private static int
Counter of idprivate Joueur
Player that own thisprivate int
Number of died ant.private boolean
-
Constructor Summary
ConstructorDescriptionFourmiliere
(int taille, Joueur j) Fourmiliere
(int taille, Joueur j, Carte mapo) Fourmiliere
(CCase ccase, Joueur j) Fourmiliere
(Joueur j, Carte mapo) -
Method Summary
Modifier and TypeMethodDescriptionint
computeScore
(fr.formiko.usual.structures.listes.GInt gi) Return score of an anthill from GGInt.void
Save stats/score in the GGInt.getCc()
getCCase()
getGc()
getGg()
static int
getI()
int
getId()
int
getLen()
int
int
fr.formiko.usual.Point
getP()
getPh()
fr.formiko.usual.Point
getPoint()
getReine()
int
getScore()
boolean
static void
ini()
void
jouer()
Let all ant play.int
length()
void
void
preTurn()
Before that ants play they all have a pre-turn update (gc.preTurn()).void
Move the anthill from a case to an other.void
void
void
void
void
setNbrFourmisMorte
(int x) void
setWaitingForEndTurn
(boolean b) fr.formiko.usual.structures.listes.GInt
toGInt()
Create a score GInt from an anthill.toString()
Return a description of the Fourmiliere.toString
(boolean b) Return a description of the Fourmiliere.Return a short description of the Fourmiliere.
-
Field Details
-
idCpt
private static int idCptCounter of id -
id
private final int idUnique id of the Fourmiliere. -
ccase
Place on the map -
joueur
Player that own this -
gc
Liste of the Creature own by the Fourmiliere -
gg
Liste of the Graine own by the Fourmiliere -
ggi
private fr.formiko.usual.structures.listes.GGInt ggiListe of the Scores turn by turn of the Fourmiliere -
nbrFourmisMorte
private int nbrFourmisMorteNumber of died ant. -
waitingForEndTurn
private boolean waitingForEndTurn
-
-
Constructor Details
-
Fourmiliere
-
Fourmiliere
-
Fourmiliere
-
Fourmiliere
-
Fourmiliere
public Fourmiliere()
-
-
Method Details
-
getId
public int getId() -
getP
public fr.formiko.usual.Point getP() -
getPoint
public fr.formiko.usual.Point getPoint() -
getCc
-
getCCase
-
setCc
Move the anthill from a case to an other.
It will not add a Fourmiliere to a case that already have 1 but throw an Exception. It will try to remove from old CCase and add to new CCase. -
setCCase
-
getI
public static int getI() -
getNbrDeFourmi
public int getNbrDeFourmi() -
getLen
public int getLen() -
length
public int length() -
setJoueur
-
getJoueur
-
getGc
-
getReine
-
getGg
-
getGGraine
-
setGg
-
setLienFere
public void setLienFere() -
getPh
-
getScore
public int getScore() -
getNbrFourmisMorte
public int getNbrFourmisMorte() -
setNbrFourmisMorte
public void setNbrFourmisMorte(int x) -
nbrFourmisMortePlus1
public void nbrFourmisMortePlus1() -
getEspece
-
getWaitingForEndTurn
public boolean getWaitingForEndTurn() -
setWaitingForEndTurn
public void setWaitingForEndTurn(boolean b) -
ini
public static void ini() -
toString
Return a description of the Fourmiliere.- Parameters:
b
- If true we also return all the descriptions of the ants of the Fourmiliere.
-
toString
Return a description of the Fourmiliere. -
toStringShort
Return a short description of the Fourmiliere. -
jouer
public void jouer()Let all ant play.
Before that ants play they all need to have a pre-turn update (this.preTurn()).
Ants do not necessarily play in order so we way for haveDoneAllActionAviable() to end turn.
At the end of the Fourmiliere turn we add a line to there stats (How many ant are alive and what stade). -
preTurn
public void preTurn()Before that ants play they all have a pre-turn update (gc.preTurn()). -
déposer
-
enregistrerLesScores
Save stats/score in the GGInt. -
toGInt
public fr.formiko.usual.structures.listes.GInt toGInt()Create a score GInt from an anthill. -
computeScore
public int computeScore(fr.formiko.usual.structures.listes.GInt gi) Return score of an anthill from GGInt. We assume that all GInt have been created with an anthill as parameter- Returns:
- the computed score
-