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

java.lang.Objectcz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot>
cz.cuni.amis.pogamut.ut2004.hideandseek.bot.HSBotModule
public class HSBotModule
BotHideAndSeekModule
| Field Summary |
|---|
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
|---|
worldView |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
agent, controller, eventBus, log |
| Constructor Summary | |
|---|---|
HSBotModule(UT2004Bot agent,
AgentInfo info,
Players players)
|
|
| Method Summary | |
|---|---|
protected void |
beginMessage(BeginMessage event)
|
protected void |
botKilled(BotKilled event)
|
boolean |
canCaptureRunner()
Tells you whether there is some RUNNER, who has been SPOTTED and was neither captured nor it escaped yet, thus it make sense to return to the safe-area to capture is. |
protected void |
cleanUp()
|
List<HSBotRecord<Player>> |
getBotRecords(HSBotState botWhoAreInThisState)
Returns list of known bots playing hide-and-seek in state 'botWhoAreInThisState'. |
HSBotState |
getBotState(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
If isRoundRunning(), returns state of 'botId' player in the game. |
HSGameConfig |
getGameConfig()
Current game config - DO NOT SET ANYTHING! Only for reading. |
cz.cuni.amis.utils.flag.ImmutableFlag<Boolean> |
getGameRunningFlag()
Whether HS-GAME has been started flag. |
HSGameState |
getGameState()
Current detailed state of the game, see HSGameState. |
cz.cuni.amis.utils.flag.ImmutableFlag<HSGameState> |
getGameStateFlag()
Current detailed state of the game, see HSGameState. |
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
getId()
Your BOT UnrealId. |
double |
getMyRestrictedAreaDistance()
Returns distance between your bot and the restricted area, the number may be negative. |
double |
getMySafeAreaDistance()
Returns distance betweenn your bot and the safe-area, the number may be negative. |
int |
getMyScore()
Returns overall score of your bot. |
HSBotState |
getMyState()
If round is running, returns HSBotState of your bot. |
double |
getRemainingHidingTime()
If isRoundRunning(), returns time (in seconds) how much time runners have left to hide before the seeker is spawned. |
double |
getRemainingRestrictedAreaTime()
If isRoundRunning(), returns time (in seconds) for how long runners cannot approach safe-area (cannot get into the restricted area). |
double |
getRemainingRoundTime()
If isRoundRunning(), returns remaining round-time (in seconds), this time includes possible hiding-time and restricted-area-time. |
double |
getRestrictedAreaDistance(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
Returns distance between 'located' from the 'restricted-area' including HSGameConfig.getRestrictedAreaRadius(), thus the returned number may be negative. |
cz.cuni.amis.utils.flag.ImmutableFlag<Boolean> |
getRoundRunningFlag()
Whether GAME-ROUND is running. |
cz.cuni.amis.pogamut.base3d.worldview.object.Location |
getSafeArea()
Precise location of the safe-area within the environment. |
double |
getSafeAreaDistance(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
Returns distance between 'located' from the 'safe-area' including HSGameConfig.getSafeAreaRadius(), thus the returned number may be negative. |
Player |
getSeeker()
If Player object is known for the seeker, returns it. |
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
getSeekerId()
Returns UNREAL-ID of the seeker if already assigned. |
List<HSBotRecord<Player>> |
getSpottedRunnerRecords()
Returns list of bot records who are in the HSBotState.RUNNER_SPOTTED. |
protected void |
hsAssignSeeker(HSAssignSeeker event)
|
protected void |
hsBotStateChanged(HSBotStateChanged event)
|
protected void |
hsGameEnd(HSGameEnd event)
|
protected void |
hsGameStart(HSGameStart event)
|
protected void |
hsPlayerScoreChanged(HSPlayerScoreChanged event)
|
protected void |
hsRoundEnd(HSRoundEnd event)
|
protected void |
hsRoundStart(HSRoundStart event)
|
protected void |
hsRoundState(HSRoundState event)
|
protected void |
hsRunnerCaptured(HSRunnerCaptured event)
|
protected void |
hsRunnerFouled(HSRunnerFouled event)
|
protected void |
hsRunnerSafe(HSRunnerSafe event)
|
protected void |
hsRunnerSpotted(HSRunnerSpotted event)
|
protected void |
hsRunnerSurvived(HSRunnerSurvived event)
|
boolean |
isGameRunning()
Whether HS-GAME has been started. |
boolean |
isHidingTime()
If isRoundRunning(), returns whether seeker now have "hiding-time" period during which the seeker is not present within the environment. |
boolean |
isInRestrictedArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
Whether 'located' is within the restricted-area given its position ( HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getRestrictedAreaRadius()). |
boolean |
isInRestrictedArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located,
double tolerance)
Whether 'located' is within the restricted-area given its position ( HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getRestrictedAreaRadius()). |
boolean |
isInSafeArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
Whether 'located' is within the safe-area given its position ( HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getSafeAreaRadius()). |
boolean |
isMeAlive()
Whether game round is running and I'm spawned, i.e., should be doing something. |
boolean |
isMeInRestrictedArea()
Whether your bot is in the restricted area. |
boolean |
isMeInRestrictedArea(double tolerance)
Whether your bot is in the restricted area enlarged given the tolerance. |
boolean |
isMeInSafeArea()
Whether your bot is within the safe-area. |
boolean |
isMeRunner()
If isRoundRunning() tells whether you are runner (true) or not (false), |
boolean |
isMeSeeker()
If isRoundRunning() tells whether you are seeker (true) or not (false), |
boolean |
isRestrictedAreaActivated()
If isRoundRunning(), returns whether restricted-area is activated, e.g., whether it will kill any runner stepping into it. |
boolean |
isRoundRunning()
Whether GAME-ROUND is running. |
boolean |
isRunner(Player bot)
If isRoundRunning(), returns whether 'bot' is runner. |
boolean |
isRunner(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
If isRoundRunning(), returns whether 'botId' is runner. |
boolean |
isSafeAreaApproachableByRunner()
If isRoundRunning(), returns whether safe-area is approachable (== !restricted-area-activated) for runners. |
boolean |
isSeeker(Player bot)
If isRoundRunning(), returns whether 'bot' is seeker. |
boolean |
isSeeker(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
If isRoundRunning(), returns whether 'botId' is seeker. |
boolean |
isSeekerSpawned()
If isRoundRunning(), returns whether seeker is present within the environment. |
protected void |
playerJoinsGame(PlayerJoinsGame event)
|
protected void |
playerLeft(PlayerLeft event)
|
protected void |
playerUpdate(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectEvent<PlayerMessage> event)
|
protected void |
spawn(Spawn event)
|
protected void |
start(boolean startToPaused)
|
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HSBotModule(UT2004Bot agent,
AgentInfo info,
Players players)
| Method Detail |
|---|
public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
UnrealId.
public boolean isGameRunning()
isRoundRunning(),
getGameState()public cz.cuni.amis.utils.flag.ImmutableFlag<Boolean> getGameRunningFlag()
getGameRunningFlag()public boolean isRoundRunning()
getGameState()public cz.cuni.amis.utils.flag.ImmutableFlag<Boolean> getRoundRunningFlag()
getGameStateFlag()public HSGameState getGameState()
HSGameState.
public cz.cuni.amis.utils.flag.ImmutableFlag<HSGameState> getGameStateFlag()
HSGameState.
public boolean isMeAlive()
If true, you should examine getGameState() and getMyState() and act accordingly.
public boolean isMeSeeker()
isRoundRunning() tells whether you are seeker (true) or not (false),if round is NOT running, returns false.
public boolean isMeRunner()
isRoundRunning() tells whether you are runner (true) or not (false),if round is NOT running, returns false.
public HSBotState getMyState()
HSBotState of your bot.
If round is NOT running, returns null.
public int getMyScore()
public boolean isSeeker(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
isRoundRunning(), returns whether 'botId' is seeker.
If round is NOT running, returns false.
botId -
public boolean isSeeker(Player bot)
isRoundRunning(), returns whether 'bot' is seeker.
If round is NOT running, returns false.
botId -
public boolean isRunner(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
isRoundRunning(), returns whether 'botId' is runner.
If round is NOT running, returns false.
botId -
public boolean isRunner(Player bot)
isRoundRunning(), returns whether 'bot' is runner.
If round is NOT running, returns false.
botId -
public boolean canCaptureRunner()
public List<HSBotRecord<Player>> getSpottedRunnerRecords()
HSBotState.RUNNER_SPOTTED.
Note that HSBotRecord.getPlayer() might not be present!
public List<HSBotRecord<Player>> getBotRecords(HSBotState botWhoAreInThisState)
Note that HSBotRecord.getPlayer() might not be present!
botWhoAreEitherInThisState -
public HSBotState getBotState(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId botId)
isRoundRunning(), returns state of 'botId' player in the game.
If round is NOT running, returns null.
botId -
public boolean isSeekerSpawned()
isRoundRunning(), returns whether seeker is present within the environment.
If round is NOT running, returns false.
public boolean isHidingTime()
isRoundRunning(), returns whether seeker now have "hiding-time" period during which the seeker is not present within the environment.
If round is NOT running, returns false.
public double getRemainingHidingTime()
isRoundRunning(), returns time (in seconds) how much time runners have left to hide before the seeker is spawned.
If round is NOT running, returns Double.POSITIVE_INFINITY.
public boolean isRestrictedAreaActivated()
isRoundRunning(), returns whether restricted-area is activated, e.g., whether it will kill any runner stepping into it.
If round is NOT running, returns false.
public double getRemainingRestrictedAreaTime()
isRoundRunning(), returns time (in seconds) for how long runners cannot approach safe-area (cannot get into the restricted area).
If round is NOT running, returns Double.POSITIVE_INFINITY.
public boolean isSafeAreaApproachableByRunner()
isRoundRunning(), returns whether safe-area is approachable (== !restricted-area-activated) for runners.
If round is NOT running, returns false.
public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getSeekerId()
public Player getSeeker()
Player object is known for the seeker, returns it.
public HSGameConfig getGameConfig()
public cz.cuni.amis.pogamut.base3d.worldview.object.Location getSafeArea()
public double getSafeAreaDistance(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
HSGameConfig.getSafeAreaRadius(), thus the returned number may be negative.
located -
public double getMySafeAreaDistance()
public boolean isInSafeArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getSafeAreaRadius()).
located -
public boolean isMeInSafeArea()
public double getRestrictedAreaDistance(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
HSGameConfig.getRestrictedAreaRadius(), thus the returned number may be negative.
located -
public double getMyRestrictedAreaDistance()
public boolean isInRestrictedArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located)
HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getRestrictedAreaRadius()).
located -
public boolean isMeInRestrictedArea()
public boolean isInRestrictedArea(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated located,
double tolerance)
HSGameConfig.getSafeArea()) and area radius (HSGameConfig.getRestrictedAreaRadius()).
located - tolerance - added to the HSGameConfig.getRestrictedAreaRadius() when comparing distances from the safe-point
public boolean isMeInRestrictedArea(double tolerance)
tolerance - added to the HSGameConfig.getRestrictedAreaRadius() when comparing distances from the safe-point
public double getRemainingRoundTime()
isRoundRunning(), returns remaining round-time (in seconds), this time includes possible hiding-time and restricted-area-time.
If round is NOT running, returns Double.POSITIVE_INFINITY.
protected void beginMessage(BeginMessage event)
protected void playerUpdate(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectEvent<PlayerMessage> event)
protected void playerLeft(PlayerLeft event)
protected void playerJoinsGame(PlayerJoinsGame event)
protected void botKilled(BotKilled event)
protected void spawn(Spawn event)
protected void hsAssignSeeker(HSAssignSeeker event)
protected void hsBotStateChanged(HSBotStateChanged event)
protected void hsGameEnd(HSGameEnd event)
protected void hsGameStart(HSGameStart event)
protected void hsPlayerScoreChanged(HSPlayerScoreChanged event)
protected void hsRoundEnd(HSRoundEnd event)
protected void hsRoundStart(HSRoundStart event)
protected void hsRoundState(HSRoundState event)
protected void hsRunnerCaptured(HSRunnerCaptured event)
protected void hsRunnerFouled(HSRunnerFouled event)
protected void hsRunnerSafe(HSRunnerSafe event)
protected void hsRunnerSpotted(HSRunnerSpotted event)
protected void hsRunnerSurvived(HSRunnerSurvived event)
protected void start(boolean startToPaused)
start in class cz.cuni.amis.pogamut.base.agent.module.AgentModule<UT2004Bot>protected void cleanUp()
cleanUp in class cz.cuni.amis.pogamut.base.agent.module.AgentModule<UT2004Bot>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||