|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensorModule<UDKBot> cz.cuni.amis.pogamut.udk.agent.module.sensor.Game
public class Game
Memory module specialized on general info about the game.
It is designed to be initialized inside IUDKBotController.prepareBot(UDKBot)
method call
and may be used since IUDKBotController.botInitialized(cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.InitedMessage)
is called.
Nested Class Summary | |
---|---|
static class |
Game.GameType
Enums for game types that shields you from Unreal's string ids of game types. |
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 | |
---|---|
Game(UDKBot bot)
Constructor. |
|
Game(UDKBot bot,
Logger log)
Constructor. |
Method Summary | |
---|---|
Map<Integer,FlagInfo> |
getAllCTFFlags()
Returns a map indexed by team numbers, holding all flags in the game. |
Collection<FlagInfo> |
getAllCTFFlagsCollection()
Returns a collection of all the flags in the game. |
Integer |
getFragLimit()
BotDeathMatch only: Number of points (e.g. kills) needed to win the game. |
Integer |
getFullHealth()
Retreives maximum level of non-boosted health. |
Game.GameType |
getGameType()
Retreives the type of the game. |
String |
getMapName()
Retreives the name of current map. |
Integer |
getMaxAdrenaline()
Retreives maximum level of adrenaline that can be gained. |
Integer |
getMaxArmor()
Retreives maximum level of combined armor. |
Integer |
getMaxHealth()
Retreives maximum level of boosted health. |
int |
getMaxHighArmor()
Retreives maximum level of high armor. |
int |
getMaxLowArmor()
Retreives maximum level of low armor. |
Integer |
getMaxMultiJump()
Retreives the maximum number of multi-jumping combos. |
Integer |
getMaxTeams()
BotTeamGame, BotCTFGame, BotDoubleDomination only: Retrieves number of teams in the game. |
Integer |
getMaxTeamSize()
BotTeamGame, BotCTFGame, BotDoubleDomination only: Retreives maximum number of players per team. |
List<Mutator> |
getMutators()
Returns list of mutators that are active in the current game. |
Double |
getRemainingTime()
Retreives time remaining for the game. |
Integer |
getStartAdrenaline()
Retreives starting level of adrenaline. |
Integer |
getStartHealth()
Retreives starting level of health. |
Integer |
getTargetAdrenaline()
Retreives target level of adrenaline that need to be gained to start special bonus actions. |
Integer |
getTeamScoreLimit()
BotTeamGame, BotCTFGame, BotBombingRun, BotDoubleDomination only: Number of points a team needs to win the game. |
double |
getTime()
Retreives current game time, since the game started. |
Double |
getTimeLimit()
Retreives time limit for the game. |
Boolean |
getWeaponsStay()
Tells, whether the weapons stay on pick-up points, even when they are picked-up by players. |
Boolean |
isBotsPaused()
Tells, whether the bots are paused or running. |
Boolean |
isPaused()
Tells, whether the game is paused or running. |
protected void |
start(boolean startPaused)
Provides initialization of the module (clearing internal data structures). |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, 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 Game(UDKBot bot)
bot
- owner of the module that is using itpublic Game(UDKBot bot, Logger log)
bot
- owner of the module that is using itlog
- Logger to be used for logging runtime/debug info. If null, the module creates its own logger.Method Detail |
---|
public Game.GameType getGameType()
public String getMapName()
public double getTime()
public Double getTimeLimit()
Note: Then the time limit is reached and the game is tie, special game modes might be turned on, e.g. sudden death overtime. Depends on the game type and game settings.
getRemainingTime()
public Double getRemainingTime()
Note: Then the time limit is reached and the game is tie, special game modes might be turned on, e.g. sudden death overtime. Depends on the game type and game settings.
getTime()
,
getTimeLimit()
public Integer getFragLimit()
Number of points (e.g. kills) needed to win the game.
getTeamScoreLimit()
public Integer getTeamScoreLimit()
Number of points a team needs to win the game.
getFragLimit()
public Integer getMaxTeams()
Retrieves number of teams in the game.
Team numbers start from 0. Usually, there are just two teams: 0 and 1.
public Integer getMaxTeamSize()
Retreives maximum number of players per team.
public Integer getStartHealth()
getMaxHealth()
,
getFullHealth()
public Integer getFullHealth()
getStartHealth()
,
getMaxHealth()
public Integer getMaxHealth()
getStartHealth()
,
getFullHealth()
public Integer getMaxArmor()
getMaxLowArmor()
,
getMaxHighArmor()
public int getMaxLowArmor()
Low armor is powered-up by small shield.
getMaxArmor()
,
getMaxHighArmor()
public int getMaxHighArmor()
High armor is powered-up by super-shield.
getMaxArmor()
,
getMaxLowArmor()
public Integer getStartAdrenaline()
public Integer getTargetAdrenaline()
Once the agent's adrenaline reaches this designated level, it can be used to start special bonus booster-actions like invisibility, speed, booster, etc. The adrenaline is then spent on the invoked action.
public Integer getMaxAdrenaline()
public Boolean getWeaponsStay()
If so, each weapon type can be picked up from pick-up points only once. If the player already has the weapon the pick-up point offers, he can not pick it up. Also, each weapon pick-up point always contains its associated weapon.
If not, weapons can be picked up from pick-up points repeatedly. If the player already has the weapon the pick-up point offers, the pick-up will simply replenish ammo for that weapon. Also, upon each pick-up by a player, the offered weapon disappears (it is "taken" by that player). Weapons respawn on empty pick-up points after a while.
public Integer getMaxMultiJump()
Note: Multi-jump combos are currently limited to double-jumps for bots.
public List<Mutator> getMutators()
public Boolean isPaused()
areBotsPaused()
public Boolean isBotsPaused()
isPaused()
public Map<Integer,FlagInfo> getAllCTFFlags()
public Collection<FlagInfo> getAllCTFFlagsCollection()
protected void start(boolean startPaused)
start
in class AgentModule<UDKBot>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |