Package jadex.micro.examples.hunterprey
Class MicroPreyAgent
- java.lang.Object
- 
- jadex.micro.examples.hunterprey.MicroPreyAgent
 
- 
 public class MicroPreyAgent extends java.lang.ObjectSimple agent participating in hunter prey.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected Grid2DenvThe environment.protected ISpaceObjectfoodThe nearest food (if any).protected java.lang.StringlastdirThe last move direction (if any).protected IResultListenerlistenerThe result listener starting the next action.protected ISpaceObjectmyselfThe creature's self representation.
 - 
Constructor SummaryConstructors Constructor Description MicroPreyAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidact()Choose and perform an action.IFuture<java.lang.Void>executeBody()Execute a step.ISpaceObjectgetNearestFood()Get the known food.voidsetNearestFood(ISpaceObject food)Set the known food.
 
- 
- 
- 
Field Detail- 
envprotected Grid2D env The environment.
 - 
myselfprotected ISpaceObject myself The creature's self representation.
 - 
lastdirprotected java.lang.String lastdir The last move direction (if any).
 - 
foodprotected ISpaceObject food The nearest food (if any).
 - 
listenerprotected IResultListener listener The result listener starting the next action.
 - 
agentprotected IInternalAccess agent The agent.
 
- 
 - 
Method Detail- 
executeBodypublic IFuture<java.lang.Void> executeBody() Execute a step.
 - 
actprotected void act() Choose and perform an action.
 - 
getNearestFoodpublic ISpaceObject getNearestFood() Get the known food.
 - 
setNearestFoodpublic void setNearestFood(ISpaceObject food) Set the known food.
 
- 
 
-