public class CTF extends SensorModule<UT2004Bot>
Modifier and Type | Class and Description |
---|---|
protected class |
CTF.FlagUpdatedListener |
protected class |
CTF.GameInfoListener
ItemPickedUp listener. |
protected class |
CTF.SelfUpdatedListener |
Modifier and Type | Field and Description |
---|---|
protected boolean |
enabled
Module is enabled ONLY for CTF games.
|
protected NavPoint |
enemyBase |
protected FlagInfo |
enemyFlag |
protected CTF.FlagUpdatedListener |
flagUpdatedListener |
protected CTF.GameInfoListener |
gameInfoListener |
AgentInfo |
info
Agent info module.
|
protected NavPoint |
ourBase |
protected FlagInfo |
ourFlag |
protected Self |
self |
protected CTF.SelfUpdatedListener |
selfAppearedListener |
worldView
agent, controller, eventBus, log
Constructor and Description |
---|
CTF(UT2004Bot bot)
Constructor.
|
CTF(UT2004Bot bot,
AgentInfo info)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBotScore()
Whether this bot can currently SCORE == our flag is at home AND this bot is carrying the flag.
|
boolean |
canEnemyTeamPossiblyScore()
Whether enemy team may score == enemy flag is at home, alias for
isEnemyFlagHome() . |
boolean |
canEnemyTeamScore()
Whether enemy team can currently SCORE by carrying our flag into enemy (their) base == enemy flag is at home && some of enemy player is carrying our flag.
|
boolean |
canOurTeamPossiblyScore()
Whether your team may score == your flag is at home, alias for
isOurFlagHome() . |
boolean |
canOurTeamScore()
Whether our team can currently SCORE by carrying enemy flag into our base == our flag is at home && some of my team-mate is carrying enemy flag.
|
protected void |
cleanUp() |
void |
flagAppeared(FlagInfo flag) |
void |
gameInfoSensed(GameInfo gameInfo) |
NavPoint |
getEnemyBase()
Returns ENEMY BASE navpoint.
|
FlagInfo |
getEnemyFlag()
Returns ENEMY flag.
|
NavPoint |
getOurBase()
Returns OUR BASE navpoint.
|
FlagInfo |
getOurFlag()
Returns OUR flag.
|
boolean |
isBotCarryingEnemyFlag()
Whether this bot (you) is carrying enemy flag.
|
boolean |
isEnabled()
Check whether the module is enabled.
|
boolean |
isEnemyFlagDropped()
ENEMY FLAG IS LAYING SOMEWHERE!
|
boolean |
isEnemyFlagHeld()
ENEMY FLAG is being carried by some team-mate.
|
boolean |
isEnemyFlagHome()
ENEMY FLAG is safe at enemy home.
|
boolean |
isEnemyTeamCarryingOurFlag()
Whether enemy team is currently carrying our flag, alias for
isOurFlagHeld() . |
boolean |
isOurFlagDropped()
OUR FLAG IS LAYING SOMEWHERE!
|
boolean |
isOurFlagHeld()
OUR FLAG is being carried by some enemy player.
|
boolean |
isOurFlagHome()
OUR FLAG is safe at home.
|
boolean |
isOurTeamCarryingEnemyFlag()
Whether our team is currently carrying enemy flag, alias for
isEnemyFlagHeld() . |
void |
selfAppeared(Self self) |
protected void |
setEnabled(boolean value)
Enabled/disabled based on the game that is currently running, see
CTF.GameInfoListener . |
protected void |
start(boolean startToPaused) |
getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, stop, toString
protected Self self
protected FlagInfo ourFlag
protected NavPoint ourBase
protected FlagInfo enemyFlag
protected NavPoint enemyBase
protected boolean enabled
protected CTF.GameInfoListener gameInfoListener
protected CTF.FlagUpdatedListener flagUpdatedListener
protected CTF.SelfUpdatedListener selfAppearedListener
public AgentInfo info
public CTF(UT2004Bot bot)
game
- game info moduleprotected void setEnabled(boolean value)
CTF.GameInfoListener
.value
- public FlagInfo getEnemyFlag()
public NavPoint getEnemyBase()
public boolean canEnemyTeamPossiblyScore()
isEnemyFlagHome()
.public boolean canEnemyTeamScore()
public boolean isEnemyTeamCarryingOurFlag()
isOurFlagHeld()
.public boolean isEnemyFlagHome()
public boolean isEnemyFlagDropped()
public boolean isEnemyFlagHeld()
public FlagInfo getOurFlag()
public NavPoint getOurBase()
public boolean canOurTeamPossiblyScore()
isOurFlagHome()
.public boolean canOurTeamScore()
public boolean canBotScore()
public boolean isBotCarryingEnemyFlag()
public boolean isOurTeamCarryingEnemyFlag()
isEnemyFlagHeld()
.public boolean isOurFlagHome()
public boolean isOurFlagDropped()
public boolean isOurFlagHeld()
public boolean isEnabled()
public void gameInfoSensed(GameInfo gameInfo)
public void flagAppeared(FlagInfo flag)
public void selfAppeared(Self self)
protected void start(boolean startToPaused)
start
in class AgentModule<UT2004Bot>
protected void cleanUp()
cleanUp
in class AgentModule<UT2004Bot>
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.