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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfo
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfoMessage
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldEvent, IWorldObject, IViewable, ICompositeWorldObject, IGBViewable, Event

public class BombInfoMessage
extends BombInfo
implements IWorldObjectUpdatedEvent

Implementation of the GameBots2004 message BOM contains also its Local/Shared/Static subpart class definitions..

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
 class BombInfoMessage.BombInfoLocalMessage
          Implementation of the local part of the GameBots2004 message BOM, used to facade BOMMessage.
 class BombInfoMessage.BombInfoSharedMessage
          Implementation of the shared part of the GameBots2004 message BOM, used to facade BOMMessage.
 class BombInfoMessage.BombInfoStaticMessage
          Implementation of the static part of the GameBots2004 message BOM, used to facade BOMMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfo
BombInfo.BombInfoUpdate, BombInfo.ObjectDisappeared
 
Field Summary
protected  UnrealId Holder
          Id of player/bot holding the bomb.
protected  java.lang.Integer HolderTeam
          The team of the current holder (if any).
protected  UnrealId Id
          An unique Id for this bomb, assigned by the game.
protected  Location Location
          An absolute location of the bomb (Sent if we can actually see the flag).
protected  boolean Reachable
          True if the bot can run here directly, false otherwise.
protected  java.lang.String State
          Represents the state the bomb is in.
protected  ITeamId TeamId
           
protected  Velocity Velocity
          Current velocity of the bomb.
protected  boolean Visible
          True if the bot can see the bomb.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfo
PROTOTYPE, SimTime
 
Constructor Summary
BombInfoMessage()
          Parameter-less contructor for the message.
BombInfoMessage(BombInfoMessage original)
          Cloning constructor from the full message.
BombInfoMessage(UnrealId Id, Velocity Velocity, Location Location, UnrealId Holder, java.lang.Integer HolderTeam, boolean Reachable, boolean Visible, java.lang.String State)
          Creates new instance of the message BombInfo.
 
Method Summary
 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.
 BombInfoLocal getLocal()
           
 Location getLocation()
          An absolute location of the bomb (Sent if we can actually see the flag).
 BombInfoShared getShared()
           
 java.lang.String getState()
          Represents the state the bomb is in.
 BombInfoStatic getStatic()
           
 ITeamId getTeamId()
           
 Velocity getVelocity()
          Current velocity of the bomb.
 boolean isReachable()
          True if the bot can run here directly, false otherwise.
 boolean isVisible()
          True if the bot can see the bomb.
protected  void setTeamId(ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.BombInfo
createDisappearEvent, getSimTime, setSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
getSimTime
 

Field Detail

TeamId

protected ITeamId TeamId

Id

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


Velocity

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


Location

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


Holder

protected UnrealId Holder
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).


HolderTeam

protected java.lang.Integer HolderTeam
The team of the current holder (if any).


Reachable

protected boolean Reachable
True if the bot can run here directly, false otherwise.


Visible

protected boolean Visible
True if the bot can see the bomb.


State

protected java.lang.String State
Represents the state the bomb is in. Can be "Held", "Dropped" or "Home".

Constructor Detail

BombInfoMessage

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


BombInfoMessage

public BombInfoMessage(UnrealId Id,
                       Velocity Velocity,
                       Location Location,
                       UnrealId Holder,
                       java.lang.Integer HolderTeam,
                       boolean Reachable,
                       boolean Visible,
                       java.lang.String State)
Creates new instance of the message BombInfo. Synchronous message. BombInfo contains all info about the bomb in the BotBombingRun game mode. Is not sent in other game types. Corresponding GameBots message is BOM.

Parameters:
Id - An unique Id for this bomb, assigned by the game.
Velocity - Current velocity of the bomb. TODO not sure if this actually does smthing
Location - An absolute location of the bomb (Sent if we can actually see the flag).
Holder - 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).
HolderTeam - The team of the current holder (if any).
Reachable - True if the bot can run here directly, false otherwise.
Visible - True if the bot can see the bomb.
State - Represents the state the bomb is in. Can be "Held", "Dropped" or "Home".

BombInfoMessage

public BombInfoMessage(BombInfoMessage original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public ITeamId getTeamId()

getId

public UnrealId getId()
Description copied from class: BombInfo
An unique Id for this bomb, assigned by the game.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject
Specified by:
getId in class BombInfo
Returns:

getVelocity

public Velocity getVelocity()
Description copied from class: BombInfo
Current velocity of the bomb. TODO not sure if this actually does smthing

Specified by:
getVelocity in class BombInfo

getLocation

public Location getLocation()
Description copied from class: BombInfo
An absolute location of the bomb (Sent if we can actually see the flag).

Specified by:
getLocation in class BombInfo

getHolder

public UnrealId getHolder()
Description copied from class: BombInfo
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 BombInfo

getHolderTeam

public java.lang.Integer getHolderTeam()
Description copied from class: BombInfo
The team of the current holder (if any).

Specified by:
getHolderTeam in class BombInfo

isReachable

public boolean isReachable()
Description copied from class: BombInfo
True if the bot can run here directly, false otherwise.

Specified by:
isReachable in class BombInfo

isVisible

public boolean isVisible()
Description copied from class: BombInfo
True if the bot can see the bomb.

Specified by:
isVisible in interface IViewable
Specified by:
isVisible in class BombInfo
Returns:
True if the object is visible; false otherwise.

getState

public java.lang.String getState()
Description copied from class: BombInfo
Represents the state the bomb is in. Can be "Held", "Dropped" or "Home".

Specified by:
getState in class BombInfo

getLocal

public BombInfoLocal getLocal()
Specified by:
getLocal in interface ICompositeWorldObject

getShared

public BombInfoShared getShared()
Specified by:
getShared in interface ICompositeWorldObject

getStatic

public BombInfoStatic getStatic()
Specified by:
getStatic in interface ICompositeWorldObject

update

public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
Specified by:
update in interface IWorldObjectUpdatedEvent

toString

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

toHtmlString

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