cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class PlayerMessage.PlayerSharedMessage

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerMessage.PlayerSharedMessage
All Implemented Interfaces:
IWorldObject, ISharedWorldObject, java.lang.Cloneable
Enclosing class:
PlayerMessage

public class PlayerMessage.PlayerSharedMessage
extends PlayerShared

Implementation of the shared part of the GameBots2004 message PLR, used to facade PLRMessage.

Complete message documentation: Synchronous message. Contains information about other players in the game, like their current velocity, position, weapon and reachability. Only reports those players that are visible. (within field of view and not occluded).


Field Summary
protected  StringProperty myAction
          Atomic action this bot is doing (BDI).
protected  IntProperty myFiring
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
protected  LocationProperty myLocation
          An absolute location of the player within the map.
protected  StringProperty myName
          Human readable name of the player.
protected  RotationProperty myRotation
          Which direction the player is facing in absolute terms.
protected  IntProperty myTeam
          What team the player is on.
protected  VelocityProperty myVelocity
          Absolute velocity of the player as a vector of movement per one game second.
protected  StringProperty myWeapon
          Class of the weapon the player is holding.
protected  java.util.HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerShared
ActionPropertyToken, FiringPropertyToken, LocationPropertyToken, NamePropertyToken, RotationPropertyToken, SharedPropertyTokens, SimTime, TeamPropertyToken, VelocityPropertyToken, WeaponPropertyToken
 
Constructor Summary
PlayerMessage.PlayerSharedMessage()
           
 
Method Summary
 PlayerMessage.PlayerSharedMessage clone()
           
 java.lang.String getAction()
          Atomic action this bot is doing (BDI).
 int getFiring()
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
 UnrealId getId()
          Unique Id of the player.
 Location getLocation()
          An absolute location of the player within the map.
 java.lang.String getName()
          Human readable name of the player.
 java.util.Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 Rotation getRotation()
          Which direction the player is facing in absolute terms.
 int getTeam()
          What team the player is on.
 Velocity getVelocity()
          Absolute velocity of the player as a vector of movement per one game second.
 java.lang.String getWeapon()
          Class of the weapon the player is holding.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerShared
getCompositeClass, getSimTime, setSimTime
 
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

myName

protected StringProperty myName
Human readable name of the player.


myAction

protected StringProperty myAction
Atomic action this bot is doing (BDI).


myRotation

protected RotationProperty myRotation
Which direction the player is facing in absolute terms.


myLocation

protected LocationProperty myLocation
An absolute location of the player within the map.


myVelocity

protected VelocityProperty myVelocity
Absolute velocity of the player as a vector of movement per one game second.


myTeam

protected IntProperty myTeam
What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.


myWeapon

protected StringProperty myWeapon
Class of the weapon the player is holding. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.


myFiring

protected IntProperty myFiring
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).

Constructor Detail

PlayerMessage.PlayerSharedMessage

public PlayerMessage.PlayerSharedMessage()
Method Detail

clone

public PlayerMessage.PlayerSharedMessage clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class PlayerShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

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

getId

public UnrealId getId()
Unique Id of the player.

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

getName

public java.lang.String getName()
Human readable name of the player.

Specified by:
getName in class PlayerShared

getAction

public java.lang.String getAction()
Atomic action this bot is doing (BDI).

Specified by:
getAction in class PlayerShared

getRotation

public Rotation getRotation()
Which direction the player is facing in absolute terms.

Specified by:
getRotation in class PlayerShared

getLocation

public Location getLocation()
An absolute location of the player within the map.

Specified by:
getLocation in class PlayerShared

getVelocity

public Velocity getVelocity()
Absolute velocity of the player as a vector of movement per one game second.

Specified by:
getVelocity in class PlayerShared

getTeam

public int getTeam()
What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.

Specified by:
getTeam in class PlayerShared

getWeapon

public java.lang.String getWeapon()
Class of the weapon the player is holding. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.

Specified by:
getWeapon in class PlayerShared

getFiring

public int getFiring()
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).

Specified by:
getFiring in class PlayerShared

toString

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

toHtmlString

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