|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AbstractAgent
warbot.kernel.Brain
warbot.kernel.ScriptedBrain
warbot.kernel.JessBrain
public class JessBrain
Constructor Summary | |
---|---|
JessBrain()
|
Method Summary | |
---|---|
void |
activate()
This method is initially called when the micro-kernel registers the agent. |
void |
getPerception()
|
void |
init()
Method invoked just after creation of the Brain and before the activate() method. |
void |
initGUI()
This method is called by the specific external graphic system (as the G-Box) to ask the agent to prepare a graphical interface. |
Methods inherited from class warbot.kernel.ScriptedBrain |
---|
doIt, edit, println |
Methods inherited from class warbot.kernel.Brain |
---|
bagSize, broadcast, broadcast, broadcast, broadcast, broadcastMessage, buildRocket, createAgent, distanceTo, drop, dropAll, eat, getBagCapacity, getBagPercepts, getCoveredDistance, getEnergyLevel, getHeading, getMaximumEnergy, getPercepts, getResourceLevel, getRocketNumber, getShot, getTeam, isBagEmpty, isBagFull, isMoving, isMyBagEmpty, isMyBagFull, isShowUserMessage, launchRocket, move, randomHeading, readMessage, receiveMessage, send, send, send, send, sendMessage, sendMessage, setHeading, setUserMessage, showUserMessage, take, towards |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JessBrain()
Method Detail |
---|
public void init()
Brain
init
in class Brain
public void initGUI()
AbstractAgent
initGUI
in class ScriptedBrain
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
public void getPerception()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |