Package fr.formiko.formiko
Class Insecte
java.lang.Object
fr.formiko.formiko.ObjetAId
fr.formiko.formiko.ObjetSurCarteAId
fr.formiko.formiko.Creature
fr.formiko.formiko.Insecte
- All Implemented Interfaces:
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
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 Summary
Fields inherited from class fr.formiko.formiko.Creature
action, age, chasse, déplacement, e, evoluer, food, givenFood, health, isDead, maxAction, maxAge, maxFood, mourir, netoyer, ph, pheromoneTolerence, pondre, stade, tour, transported, trophallaxie
Fields inherited from class fr.formiko.formiko.ObjetSurCarteAId
ccase, direction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
byte
boolean
return true if Creature have wings.getName()
byte
getSex()
byte
getType()
void
set type & Espece.void
setFemelle
(boolean b) void
setfoodEatable
(byte x) void
setfoodEatable
(int x) static void
setGie()
void
setType
(byte x) set type & Espece.void
setType
(int x) toString()
Return a string that describe this.Return a short string that describe this.boolean
return true if this whant to be clean.boolean
wantFood()
return true if this whant some food.Methods inherited from class fr.formiko.formiko.Creature
addFood, ajouteAge, ajouteFood, canLay, ceDeplacer, ceDeplacer, ceDeplacer, ceDeplacer, ceDeplacerPlusieurCase, ceNetoyer, chasse, chasser, diminuerOuPasFood, dropTransported, eat, endTurn, estFourmi, evoluer, friendlyLevel, getAction, getAge, getAlliéSurLaCase, getAlliéSurLaCaseSansThis, getEspece, getEstAllié, getEstEnnemi, getFood, getGivenFood, getHealth, getIa, getIsDead, getIsNeutral, getLastTurnEnd, getMaxAction, getMaxAge, getMaxFood, getMaxHealth, getMovingCost, getPh, getPheromone, getPheromoneTolerence, getSize, getStade, getStateAction, getStateAge, getStateFood, getStateHealth, getStringStade, getTransported, isAI, isDead, isFlying, isHungry, mourir, mourir, mourirOuPas, netoyer, netoyer, netoyerIa, pondre, preTurn, runAway, setAction, setActionMoins, setActionTo0, setAge, setAgePlus1, setCCase, setEspece, setFood, setFoodMoins1, setGivenFood, setHealth, setHealth, setIsDead, setLastTurnEnd, setMaxAction, setMaxAge, setMaxFood, setPh, setPheromone, setPheromone, setPheromone, setPheromoneTolerence, setStade, setStade, setTransported, supprimerDeLaCarte, tour, trophallaxer, trophallaxie, trophallaxie
Methods inherited from class fr.formiko.formiko.ObjetSurCarteAId
getCase, getCCase, getDirAllea, getDirection, setCc, setCCase, setDirection
-
Field Details
-
femelle
protected boolean femelle -
foodEatable
protected byte foodEatable -
gie
-
-
Constructor Details
-
Insecte
Main constructor for Insecte.
All args are Insecte var. -
Insecte
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 classCreature
-
setFemelle
public void setFemelle(boolean b) - Specified by:
setFemelle
in classCreature
-
getSex
-
getfoodEatable
public byte getfoodEatable() -
setfoodEatable
public void setfoodEatable(byte x) -
setfoodEatable
public void setfoodEatable(int x) -
getType
public byte getType() -
setType
public void setType(byte x) set type & Espece. -
setType
public void setType(int x) -
getRandomTypeInsectOnTheCase
public byte getRandomTypeInsectOnTheCase() -
setEspece
set type & Espece. -
getHaveWings
public boolean getHaveWings()Description copied from class:Creature
return true if Creature have wings.- Specified by:
getHaveWings
in classCreature
-
setGie
public static void setGie() -
getName
-
toString
Return a string that describe this. -
toStringShort
Return a short string that describe this.- Overrides:
toStringShort
in classCreature
-
wantFood
public boolean wantFood()return true if this whant some food. Insecte alway whant food from ant exept if they can eat it. -
wantClean
public boolean wantClean()return true if this whant to be clean.
-