|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.micro.MicroAgent
jadex.micro.examples.hunterprey.MicroPreyAgent
public class MicroPreyAgent
Simple agent participating in hunter prey.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jadex.micro.MicroAgent |
|---|
MicroAgent.TimerWrapper |
| Field Summary | |
|---|---|
protected Grid2D |
env
The environment. |
protected ISpaceObject |
food
The nearest food (if any). |
protected String |
lastdir
The last move direction (if any). |
protected IResultListener |
listener
The result listener starting the next action. |
protected ISpaceObject |
myself
The creature's self representation. |
| Fields inherited from class jadex.micro.MicroAgent |
|---|
interpreter, longtime, timers |
| Constructor Summary | |
|---|---|
MicroPreyAgent()
|
|
| Method Summary | |
|---|---|
protected void |
act()
Choose and perform an action. |
void |
executeBody()
Execute a step. |
ISpaceObject |
getNearestFood()
Get the known food. |
void |
setNearestFood(ISpaceObject food)
Set the known food. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Grid2D env
protected ISpaceObject myself
protected String lastdir
protected ISpaceObject food
protected IResultListener listener
| Constructor Detail |
|---|
public MicroPreyAgent()
| Method Detail |
|---|
public void executeBody()
executeBody in interface IMicroAgentexecuteBody in class MicroAgentprotected void act()
public ISpaceObject getNearestFood()
public void setNearestFood(ISpaceObject food)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||