Class Insecte

All Implemented Interfaces:
Serializable

public class Insecte extends Creature implements Serializable
Insecte class
This class is used to have all the insecte on the map. Insecte are usualy eated by ant but some will eat ant.
Specials insectes extends this class.
Almost all the var can be found in Creature.java
Author:
Hydrolien
See Also:
  • Field Details

    • femelle

      protected boolean femelle
    • foodEatable

      protected byte foodEatable
    • gie

      protected static GIEspece gie
  • Constructor Details

    • Insecte

      public Insecte(CCase p, int age, int maxAge, int maxAction)
      Main constructor for Insecte.
      All args are Insecte var.
    • Insecte

      public Insecte(CCase p)
      constructor for Insecte.
      Here we only know the location of the insecte, random value will be add for maxAge and maxAction.
    • Insecte

      public Insecte()
      constructor for Insecte.
      Here know nothing, the location of the insecte will be shoose randomly on the actual GCase of Main. Random value will be add for maxAge and maxAction.
  • Method Details

    • getFemelle

      public boolean getFemelle()
      Specified by:
      getFemelle in class Creature
    • setFemelle

      public void setFemelle(boolean b)
      Specified by:
      setFemelle in class Creature
    • getSex

      public String getSex()
      Specified by:
      getSex in class Creature
    • getfoodEatable

      public byte getfoodEatable()
    • setfoodEatable

      public void setfoodEatable(byte x)
    • setfoodEatable

      public void setfoodEatable(int x)
    • getType

      public byte getType()
      Specified by:
      getType in class Creature
    • setType

      public void setType(byte x)
      set type & Espece.
    • setType

      public void setType(int x)
    • getRandomTypeInsectOnTheCase

      public byte getRandomTypeInsectOnTheCase()
    • setEspece

      public void setEspece(Espece ex)
      set type & Espece.
      Overrides:
      setEspece in class Creature
    • getHaveWings

      public boolean getHaveWings()
      Description copied from class: Creature
      return true if Creature have wings.
      Specified by:
      getHaveWings in class Creature
    • setGie

      public static void setGie()
    • getName

      public String getName()
      Overrides:
      getName in class Creature
    • toString

      public String toString()
      Return a string that describe this.
      Overrides:
      toString in class Creature
    • toStringShort

      public String toStringShort()
      Return a short string that describe this.
      Overrides:
      toStringShort in class Creature
    • wantFood

      public boolean wantFood()
      return true if this whant some food. Insecte alway whant food from ant exept if they can eat it.
      Specified by:
      wantFood in class Creature
    • wantClean

      public boolean wantClean()
      return true if this whant to be clean.
      Specified by:
      wantClean in class Creature