modelling
Class EatingAgent
java.lang.Object
sema.Element
sema.Agent
modelling.EatingAgent
- All Implemented Interfaces:
- java.lang.Comparable
- public class EatingAgent
- extends Agent
Agent able to eat other elements.
|
Constructor Summary |
EatingAgent(World world,
Area area,
float delay,
java.awt.Image image)
Creates a new instance of eatable agent with fixed reserves and consomptions of food. |
| Methods inherited from class sema.Element |
canTake, compareTo, death, draw, getArea, getDrawingPriority, getHeight, getIcon, getImage, getKind, getName, getProperties, highlight, highlight, isMarked, kill, setDrawingPriority, setHeight, setKind, setMarked, setProperties, toString, union |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
hungrylevel
protected EatingAgent.IsHungry hungrylevel
consomption
protected EatingAgent.Consuming consomption
EatingAgent
public EatingAgent(World world,
Area area,
float delay,
java.awt.Image image)
- Creates a new instance of eatable agent with fixed reserves and consomptions of food.
getHungryLevel
protected EatingAgent.IsHungry getHungryLevel()
getConsomption
protected Agent.Action getConsomption()
eat
protected void eat(float x)
- Allows to get an among of nutrition.
consums
protected void consums(float x)
- Allows to consum an among of nutrition.