public class EmohawkEmptyBot extends EmohawkBotController
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.
| Modifier and Type | Field and Description |
|---|---|
boolean |
boolProp |
double |
doubleProp |
int |
intProp |
String |
stringProp |
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| Constructor and Description |
|---|
EmohawkEmptyBot() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
finishControllerInitialization, getConfig, getFwMap, getGame, getInfo, getMove, getNavigation, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getStats, getWorld, initializeController, initializeListeners, initializeModules, initializePathFindinggetLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdownbotShutdown, getAct, getBot, getLog, getPassword, getWorldViewpublic String stringProp
public boolean boolProp
public int intProp
public double doubleProp
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.UT2004BotControllerInitializepublic 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 configurationpublic 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.UT2004BotLogicControllerpublic 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.PogamutExceptioncz.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.PogamutExceptionCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.