|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.sposh.context.Context<BOT>
cz.cuni.amis.pogamut.sposh.context.USAR2004Context<BOT>
public class USAR2004Context<BOT extends cz.cuni.amis.pogamut.usar2004.agent.USAR2004Bot>
Primitive State Context for UT2004.
| Field Summary | |
|---|---|
protected cz.cuni.amis.pogamut.base.communication.command.IAct |
act
Shortcut for the UT2004BotModuleController#getAct(). |
protected cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator |
listenerRegistrator
Listener registrator that probes declared methods for the presence of EventListener, ObjectClassEventListener,
ObjectClassListener, ObjectEventListener and ObjectListener
annotations and automatically registers them as listeners on a specific
events. |
protected cz.cuni.amis.pogamut.base.utils.logging.LogCategory |
log
Alias for user's log. |
protected Random |
random
Random number generator that is usually useful to have during decision making. |
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.StateMasterModule |
stateModule
State module should be handy any time dealing with robots. |
protected cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
world
Shortcut for the UT2004BotModuleController#getWorldView(). |
| Fields inherited from class cz.cuni.amis.pogamut.sposh.context.Context |
|---|
bot, name |
| Constructor Summary | |
|---|---|
USAR2004Context(String name,
BOT bot)
|
|
| Method Summary | |
|---|---|
void |
finishInitialization()
Called after UT2004Behaviour#botFirstSpawn(GameInfo, ConfigChange, InitedMessage, Self)
as a hook for Pogamut's core developers to finalize initialization of
various modules. |
cz.cuni.amis.pogamut.base.communication.command.IAct |
getAct()
|
int |
getBatteryLeft()
If state module is ready and has acquired a message already, it returns the battery left. |
cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator |
getListenerRegistrator()
|
cz.cuni.amis.pogamut.base.utils.logging.LogCategory |
getLog()
|
Random |
getRandom()
|
cz.cuni.amis.pogamut.usar2004.agent.module.master.StateMasterModule |
getStateModule()
|
double |
getTime()
If state module is ready and has acquired a message already, it returns the time since the server has started. |
cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
getWorld()
|
cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
getWorldView()
|
protected void |
initialize()
Called after the construction of the UT2004Behaviour before the
GameBots2004 greets the bot even before
UT2004Behaviour#prepareBehaviour(UT2004Bot) method. |
protected void |
initializeListeners(BOT bot)
Initializes UT2004Behaviour#listenerRegistrator and calls AnnotationListenerRegistrator.addListeners()
method to probe all declared methods for event-annotation presence. |
protected void |
initializeModules(BOT bot)
Initializes memory/command modules of the bot. |
void |
logicIteration()
This method is called before the SPOSH iteration is invoked. |
protected void |
prepareBehaviour(BOT bot)
Called after the behaviour construction to initialize user's data structures. |
| Methods inherited from class cz.cuni.amis.pogamut.sposh.context.Context |
|---|
getBot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.sposh.context.IContext |
|---|
getBot |
| Field Detail |
|---|
protected Random random
protected cz.cuni.amis.pogamut.base.utils.logging.LogCategory log
protected cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator listenerRegistrator
EventListener, ObjectClassEventListener,
ObjectClassListener, ObjectEventListener and ObjectListener
annotations and automatically registers them as listeners on a specific
events. Note that this registrator is usable for 'this' object only! It will work only for 'this' object.
protected cz.cuni.amis.pogamut.base.communication.worldview.IWorldView world
UT2004BotModuleController#getWorldView().
protected cz.cuni.amis.pogamut.base.communication.command.IAct act
UT2004BotModuleController#getAct().
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.StateMasterModule stateModule
| Constructor Detail |
|---|
public USAR2004Context(String name,
BOT bot)
| Method Detail |
|---|
protected void initialize()
UT2004Behaviour before the
GameBots2004 greets the bot even before
UT2004Behaviour#prepareBehaviour(UT2004Bot) method. NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's initializeBehaviour.
protected void initializeListeners(BOT bot)
UT2004Behaviour#listenerRegistrator and calls AnnotationListenerRegistrator.addListeners()
method to probe all declared methods for event-annotation presence.
bot - protected void initializeModules(BOT bot)
bot - protected void prepareBehaviour(BOT bot)
bot - public void finishInitialization()
UT2004Behaviour#botFirstSpawn(GameInfo, ConfigChange, InitedMessage, Self)
as a hook for Pogamut's core developers to finalize initialization of
various modules. NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's finishControllerInitialization.
finishInitialization in interface IUSAR2004Context<BOT extends cz.cuni.amis.pogamut.usar2004.agent.USAR2004Bot>public void logicIteration()
public cz.cuni.amis.pogamut.usar2004.agent.module.master.StateMasterModule getStateModule()
public int getBatteryLeft()
public double getTime()
public cz.cuni.amis.pogamut.base.communication.worldview.IWorldView getWorldView()
public cz.cuni.amis.pogamut.base.communication.command.IAct getAct()
public Random getRandom()
public cz.cuni.amis.pogamut.base.utils.logging.LogCategory getLog()
public cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator getListenerRegistrator()
public cz.cuni.amis.pogamut.base.communication.worldview.IWorldView getWorld()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||