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

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

public class BombInfoSharedImpl
extends BombInfoShared

Implementation of the shared part of the GameBots2004 message BOM.

Complete message documentation: Synchronous message. BombInfo contains all info about the bomb in the BotBombingRun game mode. Is not sent in other game types.


Nested Class Summary
static class BombInfoSharedImpl.BombInfoSharedUpdate
           
 
Field Summary
protected  UnrealId Id
          An unique Id for this bomb, assigned by the game.
protected  UnrealIdProperty myHolder
          Id of player/bot holding the bomb.
protected  IntegerProperty myHolderTeam
          The team of the current holder (if any).
protected  LocationProperty myLocation
          An absolute location of the bomb (Sent if we can actually see the flag).
protected  StringProperty myState
          Represents the state the bomb is in.
protected  VelocityProperty myVelocity
          Current velocity of the bomb.
protected  java.util.HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfoShared
HolderPropertyToken, HolderTeamPropertyToken, LocationPropertyToken, SharedPropertyTokens, SimTime, StatePropertyToken, VelocityPropertyToken
 
Constructor Summary
BombInfoSharedImpl(BombInfoSharedImpl source)
           
BombInfoSharedImpl(WorldObjectId objectId, java.util.Collection<ISharedProperty> properties)
           
 
Method Summary
 BombInfoSharedImpl clone()
           
 UnrealId getHolder()
          Id of player/bot holding the bomb.
 java.lang.Integer getHolderTeam()
          The team of the current holder (if any).
 UnrealId getId()
          An unique Id for this bomb, assigned by the game.
 Location getLocation()
          An absolute location of the bomb (Sent if we can actually see the flag).
 java.util.Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 java.lang.String getState()
          Represents the state the bomb is in.
 Velocity getVelocity()
          Current velocity of the bomb.
 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.BombInfoShared
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

Id

protected UnrealId Id
An unique Id for this bomb, assigned by the game.


myVelocity

protected VelocityProperty myVelocity
Current velocity of the bomb. TODO not sure if this actually does smthing


myLocation

protected LocationProperty myLocation
An absolute location of the bomb (Sent if we can actually see the flag).


myHolder

protected UnrealIdProperty myHolder
Id of player/bot holding the bomb. (Sent if we can actually see the bomb and the bomb is being carried, or if the bomb is being carried by us).


myHolderTeam

protected IntegerProperty myHolderTeam
The team of the current holder (if any).


myState

protected StringProperty myState
Represents the state the bomb is in. Can be "Held", "Dropped" or "Home".

Constructor Detail

BombInfoSharedImpl

public BombInfoSharedImpl(BombInfoSharedImpl source)

BombInfoSharedImpl

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

setSimTime

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

Overrides:
setSimTime in class BombInfoShared

clone

public BombInfoSharedImpl clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class BombInfoShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

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

getId

public UnrealId getId()
An unique Id for this bomb, assigned by the game.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class BombInfoShared
Returns:

getVelocity

public Velocity getVelocity()
Current velocity of the bomb. TODO not sure if this actually does smthing

Specified by:
getVelocity in class BombInfoShared

getLocation

public Location getLocation()
An absolute location of the bomb (Sent if we can actually see the flag).

Specified by:
getLocation in class BombInfoShared

getHolder

public UnrealId getHolder()
Id of player/bot holding the bomb. (Sent if we can actually see the bomb and the bomb is being carried, or if the bomb is being carried by us).

Specified by:
getHolder in class BombInfoShared

getHolderTeam

public java.lang.Integer getHolderTeam()
The team of the current holder (if any).

Specified by:
getHolderTeam in class BombInfoShared

getState

public java.lang.String getState()
Represents the state the bomb is in. Can be "Held", "Dropped" or "Home".

Specified by:
getState in class BombInfoShared

toString

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

toHtmlString

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