|
||||||||||
| 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.agent.module.sensor.CTF
public class CTF
CTF module is encapsulating basic CTF-game logic. That is it tracks state of our/enemy flag and can quickly tells you whether you can score / your team can score / enemy team can score, etc... This info is available only for CTF games.
| Nested Class Summary | |
|---|---|
protected class |
CTF.FlagUpdatedListener
|
protected class |
CTF.GameInfoListener
ItemPickedUp listener. |
protected class |
CTF.SelfUpdatedListener
|
| Field Summary | |
|---|---|
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
|
| 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 | |
|---|---|
CTF(UT2004Bot bot,
AgentInfo info)
Constructor. |
|
| Method Summary | |
|---|---|
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)
|
| 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 |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public CTF(UT2004Bot bot,
AgentInfo info)
bot - owner of the moduleinfo - agent info module| Method Detail |
|---|
protected 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>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||