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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfoCompositeImpl
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ICompositeWorldObject, Event

public class GameInfoCompositeImpl
extends GameInfo

Composite implementation of the NFO abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

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
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo
GameInfo.GameInfoUpdate
 
Field Summary
protected  GameInfoLocalImpl partLocal
           
protected  GameInfoStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo
GameInfoId, PROTOTYPE, SimTime
 
Constructor Summary
GameInfoCompositeImpl()
          Parameter-less contructor for the message.
GameInfoCompositeImpl(GameInfoCompositeImpl original)
          Cloning constructor.
GameInfoCompositeImpl(GameInfoLocalImpl partLocal, GameInfoSharedImpl partShared, GameInfoStaticImpl partStatic)
          Composite-impl constructor.
 
Method Summary
 Location getBlueBaseLocation()
          Location of the base spawning the blue flag (team 1) (BotCTFGame).
 Location getDisperserLocation()
          Sent only in BotScenario game type.
 double getDisperserRadius()
          Sent only in BotScenario game type.
 double getFactoryAdrenalineCount()
          Sent only in BotScenario game type.
 Location getFactoryLocation()
          Sent only in BotScenario game type.
 double getFactoryRadius()
          Sent only in BotScenario game type.
 java.lang.String getFactorySpawnType()
          Sent only in BotScenario game type.
 Location getFirstDomPointLocation()
          Location of the first dom point (BotDoubleDomination).
 int getFragLimit()
          Number of kills needed to win game (BotDeathMatch only).
 java.lang.String getGametype()
          What you are playing (BotDeathMatch, BotTeamGame, BotCTFGame,BotDoubleDomination).
 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.
 java.lang.String getLevel()
          Name of map in game.
 GameInfoLocal getLocal()
           
 int getMaxTeams()
          Max number of teams.
 int getMaxTeamSize()
          Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).
 Location getRedBaseLocation()
          Location of the base spawning the red flag (team 0) (BotCTFGame).
 Location getSecondDomPointLocation()
          Location of the second dom point (BotDoubleDomination).
 GameInfoShared getShared()
           
 GameInfoStatic getStatic()
           
 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.GameInfo
getSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected GameInfoStaticImpl partStatic

partLocal

protected GameInfoLocalImpl partLocal
Constructor Detail

GameInfoCompositeImpl

public GameInfoCompositeImpl()
Parameter-less contructor for the message.


GameInfoCompositeImpl

public GameInfoCompositeImpl(GameInfoLocalImpl partLocal,
                             GameInfoSharedImpl partShared,
                             GameInfoStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

GameInfoCompositeImpl

public GameInfoCompositeImpl(GameInfoCompositeImpl original)
Cloning constructor.

Parameters:
original -
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 GameInfo
Returns:

setSimTime

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

Overrides:
setSimTime in class GameInfo

getStatic

public GameInfoStatic getStatic()

getLocal

public GameInfoLocal getLocal()

getShared

public GameInfoShared getShared()

getGametype

public java.lang.String getGametype()
Description copied from class: GameInfo
What you are playing (BotDeathMatch, BotTeamGame, BotCTFGame,BotDoubleDomination).

Specified by:
getGametype in class GameInfo

getLevel

public java.lang.String getLevel()
Description copied from class: GameInfo
Name of map in game.

Specified by:
getLevel in class GameInfo

isWeaponStay

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

Specified by:
isWeaponStay in class GameInfo

getTimeLimit

public double getTimeLimit()
Description copied from class: GameInfo
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 GameInfo

getFragLimit

public int getFragLimit()
Description copied from class: GameInfo
Number of kills needed to win game (BotDeathMatch only).

Specified by:
getFragLimit in class GameInfo

getGoalTeamScore

public long getGoalTeamScore()
Description copied from class: GameInfo
Number of points a team needs to win the game (BotTeamGame, BotCTFGame, BotDoubleDomination).

Specified by:
getGoalTeamScore in class GameInfo

getMaxTeams

public int getMaxTeams()
Description copied from class: GameInfo
Max number of teams. Valid team range will be 0 to (MaxTeams - 1) (BotTeamGame, BotCTFGame, BotDoubleDomination). Usually there will be two teams - 0 and 1.

Specified by:
getMaxTeams in class GameInfo

getMaxTeamSize

public int getMaxTeamSize()
Description copied from class: GameInfo
Max number of players per side (BotTeamGame, BotCTFGame, BotDoubleDomination).

Specified by:
getMaxTeamSize in class GameInfo

getRedBaseLocation

public Location getRedBaseLocation()
Description copied from class: GameInfo
Location of the base spawning the red flag (team 0) (BotCTFGame).

Specified by:
getRedBaseLocation in class GameInfo

getBlueBaseLocation

public Location getBlueBaseLocation()
Description copied from class: GameInfo
Location of the base spawning the blue flag (team 1) (BotCTFGame).

Specified by:
getBlueBaseLocation in class GameInfo

getFirstDomPointLocation

public Location getFirstDomPointLocation()
Description copied from class: GameInfo
Location of the first dom point (BotDoubleDomination).

Specified by:
getFirstDomPointLocation in class GameInfo

getSecondDomPointLocation

public Location getSecondDomPointLocation()
Description copied from class: GameInfo
Location of the second dom point (BotDoubleDomination).

Specified by:
getSecondDomPointLocation in class GameInfo

isGamePaused

public boolean isGamePaused()
Description copied from class: GameInfo
If the game is paused - nobody can move.

Specified by:
isGamePaused in class GameInfo

isBotsPaused

public boolean isBotsPaused()
Description copied from class: GameInfo
If the game is paused just for bots - human controlled players can normally move.

Specified by:
isBotsPaused in class GameInfo

getFactoryLocation

public Location getFactoryLocation()
Description copied from class: GameInfo
Sent only in BotScenario game type. Location of the factory.

Specified by:
getFactoryLocation in class GameInfo

getFactoryRadius

public double getFactoryRadius()
Description copied from class: GameInfo
Sent only in BotScenario game type. Radius of the factory.

Specified by:
getFactoryRadius in class GameInfo

getDisperserLocation

public Location getDisperserLocation()
Description copied from class: GameInfo
Sent only in BotScenario game type. Location of the goal point where UDamagePack should be taken.

Specified by:
getDisperserLocation in class GameInfo

getDisperserRadius

public double getDisperserRadius()
Description copied from class: GameInfo
Sent only in BotScenario game type. Radius of the disperser point.

Specified by:
getDisperserRadius in class GameInfo

getFactoryAdrenalineCount

public double getFactoryAdrenalineCount()
Description copied from class: GameInfo
Sent only in BotScenario game type. How much adrenaline we need to activate the factory.

Specified by:
getFactoryAdrenalineCount in class GameInfo

getFactorySpawnType

public java.lang.String getFactorySpawnType()
Description copied from class: GameInfo
Sent only in BotScenario game type. Pickup class our factory spawns when used properly. Item will be spawned at the bot's location.

Specified by:
getFactorySpawnType in class GameInfo

toString

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

toHtmlString

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