|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
public class UT2004BotController<BOT extends UT2004Bot>
Field Summary | |
---|---|
protected BOT |
bot
Instance of the bot we're controlling. |
protected LogCategory |
log
Alias for user's log. |
static String |
USER_LOG_CATEGORY_ID
Name of the log category of the user log. |
Constructor Summary | |
---|---|
UT2004BotController()
|
Method Summary | |
---|---|
void |
botFirstSpawn(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init,
Self self)
This method is called only once whenever first batch of information what the bot can see is received. |
void |
botInitialized(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init)
This method is called whenever InitedMessage is received. |
void |
botKilled(BotKilled event)
Called whenever the bot gets killed inside the game. |
void |
botShutdown()
Called whenever the bot is shutdown (has finished) or killed (not in the game but as the instance). |
void |
finishControllerInitialization()
Called after IUT2004BotController.botFirstSpawn(GameInfo, ConfigChange, InitedMessage, Self) as a hook for Pogamut's core developers
to finalize initialization of various modules. |
IAct |
getAct()
Returns mean for sending commands through bot's GB2004 communication channel. |
BOT |
getBot()
Returns underlying controlled UT2004Bot class that is managing life-cycle of the bot. |
Initialize |
getInitializeCommand()
This method is called after handshake with GameBots2004 is over and the GameBots2004 is awaiting the INIT command (Initialize class). |
LogCategory |
getLog()
Returns user log of the controller. |
UT2004BotName |
getName()
|
PasswordReply |
getPassword()
Returns password that should be used to access the GameBots2004 server. |
IVisionWorldView |
getWorldView()
Returns world view of the controlled that providing access to all objects/events the bot has. |
void |
initializeController(BOT bot)
Called during the construction of the UT2004Bot before the GameBots2004 greets the bot even before
IUT2004BotController.prepareBot(UT2004Bot) method. |
void |
prepareBot(BOT bot)
Called during the construction of the UT2004Bot before the GameBots2004 greets the bot. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String USER_LOG_CATEGORY_ID
protected BOT extends UT2004Bot bot
protected LogCategory log
Constructor Detail |
---|
public UT2004BotController()
Method Detail |
---|
public void initializeController(BOT bot)
IUT2004BotController
UT2004Bot
before the GameBots2004 greets the bot even before
IUT2004BotController.prepareBot(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 initializeController.
initializeController
in interface IUT2004BotController<BOT extends UT2004Bot>
public void prepareBot(BOT bot)
IUT2004BotController
UT2004Bot
before the GameBots2004 greets the bot.
prepareBot
in interface IUT2004BotController<BOT extends UT2004Bot>
public PasswordReply getPassword()
IUT2004BotController
Called only if the bot is challenged by the password request.
getPassword
in interface IUT2004BotController<BOT extends UT2004Bot>
public Initialize getInitializeCommand()
IUT2004BotController
getInitializeCommand
in interface IUT2004BotController<BOT extends UT2004Bot>
public void botInitialized(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init)
IUT2004BotController
InitedMessage
is received. Various agent modules are usable since this
method is called.
botInitialized
in interface IUT2004BotController<BOT extends UT2004Bot>
public void botFirstSpawn(GameInfo gameInfo, ConfigChange currentConfig, InitedMessage init, Self self)
IUT2004BotController
Note that this method has advantage over the IUT2004BotController.botInitialized(GameInfo, ConfigChange, InitedMessage)
that you already have Self
object.
botFirstSpawn
in interface IUT2004BotController<BOT extends UT2004Bot>
public void finishControllerInitialization()
IUT2004BotController
IUT2004BotController.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.
finishControllerInitialization
in interface IUT2004BotController<BOT extends UT2004Bot>
public void botKilled(BotKilled event)
IUT2004BotController
botKilled
in interface IUT2004BotController<BOT extends UT2004Bot>
public void botShutdown()
IUT2004BotController
Use the method to save your work / data collected during the run of the agent.
Pogamut's guarantee that this method is called even if exception happens inside your previous code.
botShutdown
in interface IUT2004BotController<BOT extends UT2004Bot>
public IVisionWorldView getWorldView()
IUT2004BotController
getWorldView
in interface IUT2004BotController<BOT extends UT2004Bot>
public IAct getAct()
IUT2004BotController
getAct
in interface IUT2004BotController<BOT extends UT2004Bot>
public BOT getBot()
IUT2004BotController
UT2004Bot
class that is managing life-cycle of the bot.
getBot
in interface IUT2004BotController<BOT extends UT2004Bot>
public UT2004BotName getName()
public LogCategory getLog()
IUT2004BotController
getLog
in interface IUT2004BotController<BOT extends UT2004Bot>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |