cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class GameInfoSharedImpl

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfoShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfoSharedImpl
All Implemented Interfaces:
IWorldObject, ISharedWorldObject, java.lang.Cloneable

public class GameInfoSharedImpl
extends GameInfoShared

Implementation of the shared part of the GameBots2004 message NFO.

Complete message documentation: 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.


Nested Class Summary
static class GameInfoSharedImpl.GameInfoSharedUpdate
           
 
Field Summary
protected  BooleanProperty myBotsPaused
          If the game is paused just for bots - human controlled players can normally move.
protected  IntProperty myFragLimit
          Number of kills needed to win game (BotDeathMatch only).
protected  BooleanProperty myGamePaused
          If the game is paused - nobody can move.
protected  LongProperty myGoalTeamScore
          Number of points a team needs to win the game (BotTeamGame, BotCTFGame, BotDoubleDomination).
protected  IntProperty myMaxTeamSize
          Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).
protected  DoubleProperty myTimeLimit
          Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type).
protected  BooleanProperty myWeaponStay
          If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice).
protected  java.util.HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfoShared
BotsPausedPropertyToken, FragLimitPropertyToken, GameInfoId, GamePausedPropertyToken, GoalTeamScorePropertyToken, MaxTeamSizePropertyToken, SharedPropertyTokens, SimTime, TimeLimitPropertyToken, WeaponStayPropertyToken
 
Constructor Summary
GameInfoSharedImpl(GameInfoSharedImpl source)
           
GameInfoSharedImpl(WorldObjectId objectId, java.util.Collection<ISharedProperty> properties)
           
 
Method Summary
 GameInfoSharedImpl clone()
           
 int getFragLimit()
          Number of kills needed to win game (BotDeathMatch only).
 long getGoalTeamScore()
          Number of points a team needs to win the game (BotTeamGame, BotCTFGame, BotDoubleDomination).
 UnrealId getId()
          Returns an id of the object that is unique among all world objects.
 int getMaxTeamSize()
          Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).
 java.util.Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 double getTimeLimit()
          Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type).
 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).
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfoShared
getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected java.util.HashMap<PropertyId,ISharedProperty> propertyMap

myWeaponStay

protected BooleanProperty myWeaponStay
If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice).


myTimeLimit

protected DoubleProperty myTimeLimit
Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type).


myFragLimit

protected IntProperty myFragLimit
Number of kills needed to win game (BotDeathMatch only).


myGoalTeamScore

protected LongProperty myGoalTeamScore
Number of points a team needs to win the game (BotTeamGame, BotCTFGame, BotDoubleDomination).


myMaxTeamSize

protected IntProperty myMaxTeamSize
Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).


myGamePaused

protected BooleanProperty myGamePaused
If the game is paused - nobody can move.


myBotsPaused

protected BooleanProperty myBotsPaused
If the game is paused just for bots - human controlled players can normally move.

Constructor Detail

GameInfoSharedImpl

public GameInfoSharedImpl(GameInfoSharedImpl source)

GameInfoSharedImpl

public GameInfoSharedImpl(WorldObjectId objectId,
                          java.util.Collection<ISharedProperty> properties)
Method Detail

getId

public UnrealId getId()
Description copied from interface: IWorldObject
Returns an id of the object that is unique among all world objects.

Specified by:
getId in interface IWorldObject
Overrides:
getId in class GameInfoShared
Returns:

setSimTime

public void setSimTime(long SimTime)
Description copied from class: GameInfoShared
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class GameInfoShared

clone

public GameInfoSharedImpl clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class GameInfoShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

public java.util.Map<PropertyId,ISharedProperty> getProperties()

isWeaponStay

public boolean isWeaponStay()
If true respawned weapons will stay on the ground after picked up (but bot cannot pickup same weapon twice).

Specified by:
isWeaponStay in class GameInfoShared

getTimeLimit

public double getTimeLimit()
Maximum time game will last (if tied at end may goe to "sudden death overtime" - depends on the game type).

Specified by:
getTimeLimit in class GameInfoShared

getFragLimit

public int getFragLimit()
Number of kills needed to win game (BotDeathMatch only).

Specified by:
getFragLimit in class GameInfoShared

getGoalTeamScore

public long getGoalTeamScore()
Number of points a team needs to win the game (BotTeamGame, BotCTFGame, BotDoubleDomination).

Specified by:
getGoalTeamScore in class GameInfoShared

getMaxTeamSize

public int getMaxTeamSize()
Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).

Specified by:
getMaxTeamSize in class GameInfoShared

isGamePaused

public boolean isGamePaused()
If the game is paused - nobody can move.

Specified by:
isGamePaused in class GameInfoShared

isBotsPaused

public boolean isBotsPaused()
If the game is paused just for bots - human controlled players can normally move.

Specified by:
isBotsPaused in class GameInfoShared

toString

public java.lang.String toString()
Overrides:
toString in class GameInfoShared

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class GameInfoShared