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

Package class diagram package MoverSharedImpl
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MoverShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MoverSharedImpl
All Implemented Interfaces:
IWorldObject, ILocated, ILocomotive, ISharedWorldObject, Cloneable

public class MoverSharedImpl
extends MoverShared

Implementation of the shared part of the GameBots2004 message MOV.

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
static class MoverSharedImpl.MoverSharedUpdate
           
 
Field Summary
protected  UnrealId Id
          A unique Id of this mover assigned by the game.
protected  LocationProperty myLocation
          Location of the mover.
protected  StringProperty myState
          Name of the state Mover is currently in.
protected  VelocityProperty myVelocity
          Velocity vector.
protected  HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MoverShared
LocationPropertyToken, SharedPropertyTokens, SimTime, StatePropertyToken, VelocityPropertyToken
 
Constructor Summary
MoverSharedImpl(MoverSharedImpl source)
           
MoverSharedImpl(WorldObjectId objectId, Collection<ISharedProperty> properties)
           
 
Method Summary
 MoverSharedImpl clone()
           
 UnrealId getId()
          A unique Id of this mover assigned by the game.
 Location getLocation()
          Location of the mover.
 Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 String getState()
          Name of the state Mover is currently in.
 Velocity getVelocity()
          Velocity vector.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MoverShared
getCompositeClass, getSimTime
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected HashMap<PropertyId,ISharedProperty> propertyMap

Id

protected UnrealId Id
A unique Id of this mover assigned by the game.


myLocation

protected LocationProperty myLocation
Location of the mover.


myVelocity

protected VelocityProperty myVelocity
Velocity vector.


myState

protected StringProperty myState
Name of the state Mover is currently in. Can be used to determine the type of the mover.

Constructor Detail

MoverSharedImpl

public MoverSharedImpl(MoverSharedImpl source)

MoverSharedImpl

public MoverSharedImpl(WorldObjectId objectId,
                       Collection<ISharedProperty> properties)
Method Detail

setSimTime

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

Overrides:
setSimTime in class MoverShared

clone

public MoverSharedImpl clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class MoverShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

public Map<PropertyId,ISharedProperty> getProperties()

getId

public UnrealId getId()
A unique Id of this mover assigned by the game.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class MoverShared

getLocation

public Location getLocation()
Location of the mover.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class MoverShared

getVelocity

public Velocity getVelocity()
Velocity vector.

Specified by:
getVelocity in interface ILocomotive
Specified by:
getVelocity in class MoverShared

getState

public String getState()
Name of the state Mover is currently in. Can be used to determine the type of the mover.

Specified by:
getState in class MoverShared

toString

public String toString()
Overrides:
toString in class MoverShared

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class MoverShared


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.