public class MicroPreyAgent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.IInternalAccess |
agent
The agent.
|
protected jadex.extension.envsupport.environment.space2d.Grid2D |
env
The environment.
|
protected jadex.extension.envsupport.environment.ISpaceObject |
food
The nearest food (if any).
|
protected java.lang.String |
lastdir
The last move direction (if any).
|
protected jadex.commons.future.IResultListener |
listener
The result listener starting the next action.
|
protected jadex.extension.envsupport.environment.ISpaceObject |
myself
The creature's self representation.
|
Constructor and Description |
---|
MicroPreyAgent() |
Modifier and Type | Method and Description |
---|---|
protected void |
act()
Choose and perform an action.
|
jadex.commons.future.IFuture<java.lang.Void> |
executeBody()
Execute a step.
|
jadex.extension.envsupport.environment.ISpaceObject |
getNearestFood()
Get the known food.
|
void |
setNearestFood(jadex.extension.envsupport.environment.ISpaceObject food)
Set the known food.
|
protected jadex.extension.envsupport.environment.space2d.Grid2D env
protected jadex.extension.envsupport.environment.ISpaceObject myself
protected java.lang.String lastdir
protected jadex.extension.envsupport.environment.ISpaceObject food
protected jadex.commons.future.IResultListener listener
protected jadex.bridge.IInternalAccess agent
public jadex.commons.future.IFuture<java.lang.Void> executeBody()
protected void act()
public jadex.extension.envsupport.environment.ISpaceObject getNearestFood()
public void setNearestFood(jadex.extension.envsupport.environment.ISpaceObject food)