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

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

public class MoverMessage
extends Mover
implements IWorldObjectUpdatedEvent

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

Complete message documentation: Synchronous message. Movers can be doors, elevators, or any other chunk of architecture that can move. They generally need to be either run into, or activated by shooting or pressing a button. We are working on ways to provide bots with more of the information they need to deal with movers appropriately.


Nested Class Summary
 class MoverMessage.MoverLocalMessage
          Implementation of the local part of the GameBots2004 message MOV, used to facade MOVMessage.
 class MoverMessage.MoverSharedMessage
          Implementation of the shared part of the GameBots2004 message MOV, used to facade MOVMessage.
 class MoverMessage.MoverStaticMessage
          Implementation of the static part of the GameBots2004 message MOV, used to facade MOVMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Mover
Mover.MoverUpdate, Mover.ObjectDisappeared
 
Field Summary
protected  Location BasePos
          Base position of the mover.
protected  Location BaseRot
          Base rotation of the mover.
protected  boolean DamageTrig
          True if the mover needs to be shot to be activated.
protected  double DelayTime
          Delay before starting to open (or before lift starts to move).
protected  UnrealId Id
          A unique Id of this mover assigned by the game.
protected  boolean IsMoving
          Does the mover move right now?
protected  Location Location
          Location of the mover.
protected  double MoveTime
          How long the mover moves, when it becomes triggered, before it stops.
protected  UnrealId NavPointMarker
          Navigation point marking this mover.
protected  double OpenTime
          How long the mover stands still when it reaches its destination position.
protected  boolean Reachable
          True if the bot can run here, false otherwise.
protected  java.lang.String State
          Name of the state Mover is currently in.
protected  ITeamId TeamId
           
protected  java.lang.String Type
          String class of the mover.
protected  Velocity Velocity
          Velocity vector.
protected  boolean Visible
          If the mover is in the field of view of the bot.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Mover
PROTOTYPE, SimTime
 
Constructor Summary
MoverMessage()
          Parameter-less contructor for the message.
MoverMessage(MoverMessage original)
          Cloning constructor from the full message.
MoverMessage(UnrealId Id, Location Location, boolean Visible, boolean Reachable, boolean DamageTrig, java.lang.String Type, boolean IsMoving, Velocity Velocity, double MoveTime, double OpenTime, Location BasePos, Location BaseRot, double DelayTime, java.lang.String State, UnrealId NavPointMarker)
          Creates new instance of the message Mover.
 
Method Summary
 Location getBasePos()
          Base position of the mover.
 Location getBaseRot()
          Base rotation of the mover.
 double getDelayTime()
          Delay before starting to open (or before lift starts to move).
 UnrealId getId()
          A unique Id of this mover assigned by the game.
 MoverLocal getLocal()
           
 Location getLocation()
          Location of the mover.
 double getMoveTime()
          How long the mover moves, when it becomes triggered, before it stops.
 UnrealId getNavPointMarker()
          Navigation point marking this mover.
 double getOpenTime()
          How long the mover stands still when it reaches its destination position.
 MoverShared getShared()
           
 java.lang.String getState()
          Name of the state Mover is currently in.
 MoverStatic getStatic()
           
 ITeamId getTeamId()
           
 java.lang.String getType()
          String class of the mover.
 Velocity getVelocity()
          Velocity vector.
 boolean isDamageTrig()
          True if the mover needs to be shot to be activated.
 boolean isIsMoving()
          Does the mover move right now?
 boolean isReachable()
          True if the bot can run here, false otherwise.
 boolean isVisible()
          If the mover is in the field of view of the bot.
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.Mover
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
A unique Id of this mover assigned by the game.


Location

protected Location Location
Location of the mover.


Visible

protected boolean Visible
If the mover is in the field of view of the bot.


Reachable

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


DamageTrig

protected boolean DamageTrig
True if the mover needs to be shot to be activated.


Type

protected java.lang.String Type
String class of the mover.


IsMoving

protected boolean IsMoving
Does the mover move right now?


Velocity

protected Velocity Velocity
Velocity vector.


MoveTime

protected double MoveTime
How long the mover moves, when it becomes triggered, before it stops.


OpenTime

protected double OpenTime
How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.


BasePos

protected Location BasePos
Base position of the mover.


BaseRot

protected Location BaseRot
Base rotation of the mover.


DelayTime

protected double DelayTime
Delay before starting to open (or before lift starts to move).


State

protected java.lang.String State
Name of the state Mover is currently in. Can be used to determine the type of the mover.


NavPointMarker

protected UnrealId NavPointMarker
Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.

Constructor Detail

MoverMessage

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


MoverMessage

public MoverMessage(UnrealId Id,
                    Location Location,
                    boolean Visible,
                    boolean Reachable,
                    boolean DamageTrig,
                    java.lang.String Type,
                    boolean IsMoving,
                    Velocity Velocity,
                    double MoveTime,
                    double OpenTime,
                    Location BasePos,
                    Location BaseRot,
                    double DelayTime,
                    java.lang.String State,
                    UnrealId NavPointMarker)
Creates new instance of the message Mover. Synchronous message. Movers can be doors, elevators, or any other chunk of architecture that can move. They generally need to be either run into, or activated by shooting or pressing a button. We are working on ways to provide bots with more of the information they need to deal with movers appropriately. Corresponding GameBots message is MOV.

Parameters:
Id - A unique Id of this mover assigned by the game.
Location - Location of the mover.
Visible - If the mover is in the field of view of the bot.
Reachable - True if the bot can run here, false otherwise.
DamageTrig - True if the mover needs to be shot to be activated.
Type - String class of the mover.
IsMoving - Does the mover move right now?
Velocity - Velocity vector.
MoveTime - How long the mover moves, when it becomes triggered, before it stops.
OpenTime - How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.
BasePos - Base position of the mover.
BaseRot - Base rotation of the mover.
DelayTime - Delay before starting to open (or before lift starts to move).
State - Name of the state Mover is currently in. Can be used to determine the type of the mover.
NavPointMarker - Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.

MoverMessage

public MoverMessage(MoverMessage 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: Mover
A unique Id of this mover assigned by the game.

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

getLocation

public Location getLocation()
Description copied from class: Mover
Location of the mover.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class Mover
Returns:
Current location of the object, represented as a point within the world's coordinates.

isVisible

public boolean isVisible()
Description copied from class: Mover
If the mover is in the field of view of the bot.

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

isReachable

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

Specified by:
isReachable in class Mover

isDamageTrig

public boolean isDamageTrig()
Description copied from class: Mover
True if the mover needs to be shot to be activated.

Specified by:
isDamageTrig in class Mover

getType

public java.lang.String getType()
Description copied from class: Mover
String class of the mover.

Specified by:
getType in class Mover

isIsMoving

public boolean isIsMoving()
Description copied from class: Mover
Does the mover move right now?

Specified by:
isIsMoving in class Mover

getVelocity

public Velocity getVelocity()
Description copied from class: Mover
Velocity vector.

Specified by:
getVelocity in interface ILocomotive
Specified by:
getVelocity in class Mover
Returns:
Current direction in which the object is moving and absolute velocity of the object within the world. The direction is represented as a vector within the world's coordinates. The size of velocity is represented by length of that vector.

getMoveTime

public double getMoveTime()
Description copied from class: Mover
How long the mover moves, when it becomes triggered, before it stops.

Specified by:
getMoveTime in class Mover

getOpenTime

public double getOpenTime()
Description copied from class: Mover
How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.

Specified by:
getOpenTime in class Mover

getBasePos

public Location getBasePos()
Description copied from class: Mover
Base position of the mover.

Specified by:
getBasePos in class Mover

getBaseRot

public Location getBaseRot()
Description copied from class: Mover
Base rotation of the mover.

Specified by:
getBaseRot in class Mover

getDelayTime

public double getDelayTime()
Description copied from class: Mover
Delay before starting to open (or before lift starts to move).

Specified by:
getDelayTime in class Mover

getState

public java.lang.String getState()
Description copied from class: Mover
Name of the state Mover is currently in. Can be used to determine the type of the mover.

Specified by:
getState in class Mover

getNavPointMarker

public UnrealId getNavPointMarker()
Description copied from class: Mover
Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.

Specified by:
getNavPointMarker in class Mover

getLocal

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

getShared

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

getStatic

public MoverStatic 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 Mover

toHtmlString

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