Class Fourmiliere

java.lang.Object
fr.formiko.formiko.Fourmiliere
All Implemented Interfaces:
Serializable

public class Fourmiliere extends Object implements Serializable
See Also:
  • Field Details

    • idCpt

      private static int idCpt
      Counter of id
    • id

      private final int id
      Unique id of the Fourmiliere.
    • ccase

      private CCase ccase
      Place on the map
    • joueur

      private Joueur joueur
      Player that own this
    • gc

      private GCreature gc
      Liste of the Creature own by the Fourmiliere
    • gg

      private GGraine gg
      Liste of the Graine own by the Fourmiliere
    • ggi

      private fr.formiko.usual.structures.listes.GGInt ggi
      Liste of the Scores turn by turn of the Fourmiliere
    • nbrFourmisMorte

      private int nbrFourmisMorte
      Number of died ant.
    • waitingForEndTurn

      private boolean waitingForEndTurn
  • Constructor Details

    • Fourmiliere

      public Fourmiliere(CCase ccase, Joueur j)
    • Fourmiliere

      public Fourmiliere(Joueur j, Carte mapo)
    • Fourmiliere

      public Fourmiliere(int taille, Joueur j, Carte mapo)
    • Fourmiliere

      public Fourmiliere(int taille, Joueur j)
    • Fourmiliere

      public Fourmiliere()
  • Method Details

    • getId

      public int getId()
    • getP

      public fr.formiko.usual.Point getP()
    • getPoint

      public fr.formiko.usual.Point getPoint()
    • getCc

      public CCase getCc()
    • getCCase

      public CCase getCCase()
    • setCc

      public void setCc(CCase newCCase)
      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

      public void setCCase(CCase ccase)
    • getI

      public static int getI()
    • getNbrDeFourmi

      public int getNbrDeFourmi()
    • getLen

      public int getLen()
    • length

      public int length()
    • setJoueur

      public void setJoueur(Joueur j)
    • getJoueur

      public Joueur getJoueur()
    • getGc

      public GCreature getGc()
    • getReine

      public Creature getReine()
    • getGg

      public GGraine getGg()
    • getGGraine

      public GGraine getGGraine()
    • setGg

      public void setGg(GGraine gg)
    • setLienFere

      public void setLienFere()
    • getPh

      public Pheromone getPh()
    • getScore

      public int getScore()
    • getNbrFourmisMorte

      public int getNbrFourmisMorte()
    • setNbrFourmisMorte

      public void setNbrFourmisMorte(int x)
    • nbrFourmisMortePlus1

      public void nbrFourmisMortePlus1()
    • getEspece

      public Espece getEspece()
    • getWaitingForEndTurn

      public boolean getWaitingForEndTurn()
    • setWaitingForEndTurn

      public void setWaitingForEndTurn(boolean b)
    • ini

      public static void ini()
    • toString

      public String toString(boolean b)
      Return a description of the Fourmiliere.
      Parameters:
      b - If true we also return all the descriptions of the ants of the Fourmiliere.
    • toString

      public String toString()
      Return a description of the Fourmiliere.
      Overrides:
      toString in class Object
    • toStringShort

      public String 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

      public void déposer(Graine g)
    • enregistrerLesScores

      public String 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