|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AbstractAgent
dynamicbees.AbstractBee
dynamicbees.Bee
public class Bee
Field Summary | |
---|---|
QueenBee |
queen
|
Fields inherited from class dynamicbees.AbstractBee |
---|
beeColor, beeWorld, oldp, p |
Constructor Summary | |
---|---|
Bee()
|
Method Summary | |
---|---|
void |
activate()
This method is initially called when the micro-kernel registers the agent. |
void |
buzz()
The "do it" method called by the activator |
void |
setQueenBee(QueenBee qb)
|
Methods inherited from class dynamicbees.AbstractBee |
---|
randomFromRange, RangedRdm, setEnvironment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public QueenBee queen
Constructor Detail |
---|
public Bee()
Method Detail |
---|
public void setQueenBee(QueenBee qb)
public void buzz()
public void activate()
AbstractAgent
Here is a typical example (taken from the PingPong
agent of MadKit (plugin demos)) :
public void activate() { try { createGroup(true,"ping-pong",null,null); println ("No ping-pong group : I created one"); creator=true; } catch (OrganizationRequestException e) { // the group already exists creator=false; println ("A ping-pong group already exists : I will join"); } requestRole("ping-pong","player",null); }
activate
in class AbstractAgent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |