|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.InfoMessage
cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.GameInfo
public class GameInfo
Asynchronous message. Sent as response to READY command. Information about the game. What type of game is it going to be, number of teams, maximum size of teams etc. Corresponding GameBots message is NFO.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent |
---|
IWorldObjectUpdatedEvent.DestroyWorldObject |
Field Summary | |
---|---|
protected Location |
BlueBaseLocation
Location of the base spawning the blue flag (team 1) (BotCTFGame). |
protected boolean |
BotsPaused
If the game is paused just for bots - human controlled players can normally move. |
protected int |
FragLimit
Number of kills needed to win game (BotDeathMatch only). |
static UnrealId |
GameInfoId
|
protected boolean |
GamePaused
If the game is paused - nobody can move. |
protected String |
Gametype
What you are playing (BotDeathMatch, BotTeamGame, BotCTFGame). |
protected double |
GoalTeamScore
Number of points a team needs to win the game (BotTeamGame, BotCTFGame). |
protected String |
Level
Name of map in game. |
protected int |
MaxTeams
Max number of teams. |
protected int |
MaxTeamSize
Max number of players per side (BotTeamGame, BotCTFGame). |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected Location |
RedBaseLocation
Location of the base spawning the red flag (team 0) (BotCTFGame). |
protected double |
Time
|
protected double |
TimeLimit
Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type). |
protected boolean |
WeaponStay
If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice). |
Constructor Summary | |
---|---|
GameInfo()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
GameInfo(GameInfo original)
Cloning constructor. |
|
GameInfo(String Gametype,
String Level,
boolean WeaponStay,
double TimeLimit,
int FragLimit,
double GoalTeamScore,
int MaxTeams,
int MaxTeamSize,
Location RedBaseLocation,
Location BlueBaseLocation,
boolean GamePaused,
boolean BotsPaused)
Creates new instance of command GameInfo. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Location |
getBlueBaseLocation()
Location of the base spawning the blue flag (team 1) (BotCTFGame). |
int |
getFragLimit()
Number of kills needed to win game (BotDeathMatch only). |
String |
getGametype()
What you are playing (BotDeathMatch, BotTeamGame, BotCTFGame). |
double |
getGoalTeamScore()
Number of points a team needs to win the game (BotTeamGame, BotCTFGame). |
UnrealId |
getId()
|
double |
getLastSeenTime()
|
String |
getLevel()
Name of map in game. |
ILocalWorldObject |
getLocal()
|
int |
getMaxTeams()
Max number of teams. |
int |
getMaxTeamSize()
Max number of players per side (BotTeamGame, BotCTFGame). |
IWorldObject |
getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated). |
Location |
getRedBaseLocation()
Location of the base spawning the red flag (team 0) (BotCTFGame). |
ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
IStaticWorldObject |
getStatic()
|
protected double |
getTime()
|
double |
getTimeLimit()
Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type). |
int |
hashCode()
|
boolean |
isBotsPaused()
If the game is paused just for bots - human controlled players can normally move. |
boolean |
isGamePaused()
If the game is paused - nobody can move. |
boolean |
isWeaponStay()
If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice). |
protected void |
setTime(double time)
|
String |
toHtmlString()
|
String |
toString()
|
IWorldObjectUpdateResult |
update(IWorldObject obj)
|
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
---|
toJsonLiteral |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected String Gametype
protected String Level
protected boolean WeaponStay
protected double TimeLimit
protected int FragLimit
protected double GoalTeamScore
protected int MaxTeams
protected int MaxTeamSize
protected Location RedBaseLocation
protected Location BlueBaseLocation
protected boolean GamePaused
protected boolean BotsPaused
public static final UnrealId GameInfoId
protected double Time
Constructor Detail |
---|
public GameInfo(String Gametype, String Level, boolean WeaponStay, double TimeLimit, int FragLimit, double GoalTeamScore, int MaxTeams, int MaxTeamSize, Location RedBaseLocation, Location BlueBaseLocation, boolean GamePaused, boolean BotsPaused)
Gametype
- What you are playing (BotDeathMatch, BotTeamGame,
BotCTFGame).Level
- Name of map in game.WeaponStay
- If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice).TimeLimit
- Maximum time game will last (if tied at end may goe to
"sudden death overtime" - depends on the game type).FragLimit
- Number of kills needed to win game (BotDeathMatch only).GoalTeamScore
- Number of points a team needs to win the game (BotTeamGame,
BotCTFGame).MaxTeams
- Max number of teams. Valid team range will be 0 to (MaxTeams
- 1) (BotTeamGame, BotCTFGame). Usually
there will be two teams - 0 and 1.MaxTeamSize
- Max number of players per side (BotTeamGame, BotCTFGame).RedBaseLocation
- Location of the base spawning the red flag (team 0) (BotCTFGame).BlueBaseLocation
- Location of the base spawning the blue flag (team 1) (BotCTFGame).GamePaused
- If the game is paused - nobody can move.BotsPaused
- If the game is paused just for bots - human controlled
players can normally move.public GameInfo(GameInfo original)
public GameInfo()
Method Detail |
---|
public String getGametype()
public String getLevel()
public boolean isWeaponStay()
public double getTimeLimit()
public int getFragLimit()
public double getGoalTeamScore()
public int getMaxTeams()
public int getMaxTeamSize()
public Location getRedBaseLocation()
public Location getBlueBaseLocation()
public boolean isGamePaused()
public boolean isBotsPaused()
public UnrealId getId()
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
protected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public ILocalWorldObject getLocal()
public ISharedWorldObject getShared()
public IStaticWorldObject getStatic()
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldObject
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public IWorldObjectUpdateResult update(IWorldObject obj)
update
in interface IWorldObjectUpdatedEvent
public IWorldObject getObject()
public String toString()
toString
in class InfoMessage
public String toHtmlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |