| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class of humans.
Field Summary | |
protected boolean | energyBufferChanged Did we change the energy buffer during evolve? Used to fire a SquareChangedEvt so the energy buffer will be drawn correct. |
protected final static int | maxEnergyBuffer Maximum energy buffer value (100%). |
protected final static int | minEnergyBuffer Minimum energy buffer value (0%). |
Constructor Summary | |
Human(SquareOfLand sq) Create a new human. |
Method Summary | |
void | decreaseEnergyBuffer(double value) Decreases the energybuffer of this human with the given value. |
void | die() Let this human die. |
boolean | energyBufferEmpty() Checks whether the energybuffer of this human is empty |
boolean | energyBufferFull() Checks whether the energybuffer of this human is full (100%) |
void | evolve(double value) The evolution for the human when Evolution ticks time. |
protected void | evolve(Action action) Evolve by doing the given action. |
protected void | findSquare(Action action) Find some squares to do the given action on. |
Action | getAction() Get the action for this human. |
double | getEnergyBuffer() Returns the energybuffer of this human |
String | getEnergyBufferState() Get the energy buffer state. |
InfoList | getInfo() Create an infolist with information about this human. |
double | getPriority() Returns the priority of this evolver. |
SquareOfLand | getSquareOfLand() Get the square of land this human stands on. |
String | getState() Get the state of this human. |
long | getTimeToLive() Get the time to live. |
int | getVisionRange() Return the vision range for this human. |
protected void | increaseEnergyBuffer() Increases the energybuffer of this human. |
boolean | isPerforming() Is the human capable of performing its assigned task? |
double | maxEnergyProduction(Map m1, Map m2) How much energy will this evolver produce in this step. |
boolean | producesEnergy() Does this evolver produce energy? |
void | setAction(String actionName) Let this human perform the given action from now on. |
protected void | setAction(Action a) Set the action for this human. |
protected void | setEnergyBuffer(double value) Set the energybuffer of this human |
protected void | setPerforming(boolean performing) Mark the human as capable or incapable of performing its assigned action. |
void | setSquareOfLand(SquareOfLand square) Set the square of land this human stands on. |
void | setTimeToLive(long time) Set the time to live. |
void | setVisionRange(int range) Set the vision range for this human. |
protected void | transformLand(SquareOfLand sq) If the current action also transforms land, then do that. |
Field Detail |
protected boolean energyBufferChanged
protected final static int maxEnergyBuffer
protected final static int minEnergyBuffer
Constructor Detail |
public Human(SquareOfLand sq)
throws evolution.lands.IllegalPlacementException
Method Detail |
public void decreaseEnergyBuffer(double value)
throws EmptyEnergyBufferException
public void die()
public boolean energyBufferEmpty()
public boolean energyBufferFull()
public void evolve(double value)
protected void evolve(Action action)
protected void findSquare(Action action)
public Action getAction()
public double getEnergyBuffer()
public String getEnergyBufferState()
public InfoList getInfo()
public double getPriority()
public SquareOfLand getSquareOfLand()
public String getState()
public long getTimeToLive()
public int getVisionRange()
protected void increaseEnergyBuffer()
throws evolution.resources.NotEnoughResourcesException
public boolean isPerforming()
public double maxEnergyProduction(Map m1, Map m2)
public boolean producesEnergy()
public void setAction(String actionName)
protected void setAction(Action a)
protected void setEnergyBuffer(double value)
throws EmptyEnergyBufferException
protected void setPerforming(boolean performing)
public void setSquareOfLand(SquareOfLand square)
public void setTimeToLive(long time)
public void setVisionRange(int range)
throws InvalidVisionRangeException
protected void transformLand(SquareOfLand sq)
Association Links |
to Class evolution.lands.SquareOfLand
| a gvijf production | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |