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

java.lang.Objectcz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<BOT>
cz.cuni.amis.pogamut.emohawk.bot.impl.EmohawkBotController
cz.cuni.amis.pogamut.emohawk.examples.emptybot.EmohawkEmptyBot
public class EmohawkEmptyBot
Pogamut's "Hello world!" example showing few extra things such as introspection and various bot-initializing methods.
First, try to run the bot and kill it... than uncomment the line inside botKilled(BotKilled)
and run the bot again kill it to see the difference.
| Field Summary | |
|---|---|
boolean |
boolProp
|
double |
doubleProp
|
int |
intProp
|
String |
stringProp
|
| Fields inherited from class cz.cuni.amis.pogamut.emohawk.bot.impl.EmohawkBotController |
|---|
act, animations, comm, config, emohawkNavigation, emoticons, fwMap, game, getBackToNavGraph, info, inventory, listenerRegistrator, move, navigation, pathExecutor, pathPlanner, places, players, random, raycasting, runStraight, senses, stats, steering, world |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
|---|
logicModule |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
|---|
bot, log, USER_LOG_CATEGORY_ID |
| Constructor Summary | |
|---|---|
EmohawkEmptyBot()
|
|
| Method Summary | |
|---|---|
void |
beforeFirstLogic()
This method is called only once right before actual logic() method is called for the first time. |
void |
botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo gameInfo,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange config,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self self)
The bot is initilized in the environment - a physical representation of the bot is present in the game. |
void |
botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo gameInfo,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange currentConfig,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init)
Handshake with GameBots2004 is over - bot has information about the map in its world view. |
void |
botKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled event)
Called each time the bot dies. |
cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize |
getInitializeCommand()
Here we can modify initializing command for our bot, e.g., sets its name or skin. |
void |
logic()
Main method that controls the bot - makes decisions what to do next. |
static void |
main(String[] args)
This method is called when the bot is started either from IDE or from command line. |
void |
prepareBot(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
Initialize all necessary variables here, before the bot actually receives anything from the environment. |
| Methods inherited from class cz.cuni.amis.pogamut.emohawk.bot.impl.EmohawkBotController |
|---|
finishControllerInitialization, getConfig, getFwMap, getGame, getInfo, getMove, getNavigation, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getStats, getWorld, initializeController, initializeListeners, initializeModules, initializePathFinding |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
|---|
getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdown |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
|---|
botShutdown, getAct, getBot, getLog, getPassword, getWorldView |
| 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.ut2004.bot.IUT2004BotController |
|---|
botShutdown, getAct, getBot, getLog, getPassword, getWorldView |
| Field Detail |
|---|
public String stringProp
public boolean boolProp
public int intProp
public double doubleProp
| Constructor Detail |
|---|
public EmohawkEmptyBot()
| Method Detail |
|---|
public void prepareBot(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot bot)
prepareBot in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotControllerprepareBot in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotControllerpublic cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize getInitializeCommand()
getInitializeCommand in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotControllergetInitializeCommand in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotControllerInitialize
public void botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo gameInfo,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange currentConfig,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init)
botInitialized in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotControllerbotInitialized in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotControllergameInfo - informaton about the game typeconfig - information about configurationinit - information about configuration
public void botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo gameInfo,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange config,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage init,
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Self self)
botFirstSpawn in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotControllerbotFirstSpawn in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotControllergameInfo - informaton about the game typeconfig - information about configurationinit - information about configurationself - information about the agentpublic void beforeFirstLogic()
beforeFirstLogic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogicbeforeFirstLogic in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
public void logic()
throws cz.cuni.amis.utils.exception.PogamutException
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogiclogic in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicControllercz.cuni.amis.pogamut.base.exceptions.PogamutException
cz.cuni.amis.utils.exception.PogamutExceptionpublic void botKilled(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BotKilled event)
botKilled in interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotControllerbotKilled in class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotControllerevent -
public static void main(String[] args)
throws cz.cuni.amis.utils.exception.PogamutException
args -
cz.cuni.amis.utils.exception.PogamutException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||