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

Package class diagram package PlayerMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive, cz.cuni.amis.pogamut.base3d.worldview.object.IRotable, cz.cuni.amis.pogamut.base3d.worldview.object.IViewable, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject, cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer, IPerson, IGBViewable, cz.cuni.amis.utils.listener.Event

public class PlayerMessage
extends Player
implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

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

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).


Nested Class Summary
 class PlayerMessage.PlayerLocalMessage
          Implementation of the local part of the GameBots2004 message PLR, used to facade PLRMessage.
 class PlayerMessage.PlayerSharedMessage
          Implementation of the shared part of the GameBots2004 message PLR, used to facade PLRMessage.
 class PlayerMessage.PlayerStaticMessage
          Implementation of the static part of the GameBots2004 message PLR, used to facade PLRMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player
Player.ObjectDisappeared, Player.PlayerUpdate
 
Field Summary
protected  String Action
          Atomic action this bot is doing (BDI).
protected  boolean Action_Set
          Whether property 'Action' was received from GB2004.
protected  String Anim
          For UE2.
protected  boolean Anim_Set
          Whether property 'Anim' was received from GB2004.
protected  String Bubble
          For UE2.
protected  boolean Bubble_Set
          Whether property 'Bubble' was received from GB2004.
protected  boolean Crouched
          True if the bot is crouched.
protected  boolean Crouched_Set
          Whether property 'Crouched' was received from GB2004.
protected  String EmotCenter
          For UE2.
protected  boolean EmotCenter_Set
          Whether property 'EmotCenter' was received from GB2004.
protected  String EmotLeft
          For UE2.
protected  boolean EmotLeft_Set
          Whether property 'EmotLeft' was received from GB2004.
protected  String EmotRight
          For UE2.
protected  boolean EmotRight_Set
          Whether property 'EmotRight' was received from GB2004.
protected  int Firing
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
protected  boolean Firing_Set
          Whether property 'Firing' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          Unique Id of the player.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  String Jmx
          Exported just for control server.
protected  boolean Jmx_Set
          Whether property 'Jmx' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
          An absolute location of the player within the map.
protected  boolean Location_Set
          Whether property 'Location' was received from GB2004.
protected  String Name
          Human readable name of the player.
protected  boolean Name_Set
          Whether property 'Name' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation
          Which direction the player is facing in absolute terms.
protected  boolean Rotation_Set
          Whether property 'Rotation' was received from GB2004.
protected  int Team
          What team the player is on.
protected  boolean Team_Set
          Whether property 'Team' was received from GB2004.
protected  cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId
           
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
          Absolute velocity of the player as a vector of movement per one game second.
protected  boolean Velocity_Set
          Whether property 'Velocity' was received from GB2004.
protected  boolean Visible
          If the player is in the field of view of the bot.
protected  boolean Visible_Set
          Whether property 'Visible' was received from GB2004.
protected  String Weapon
          Class of the weapon the player is holding.
protected  boolean Weapon_Set
          Whether property 'Weapon' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player
PROTOTYPE, SimTime
 
Constructor Summary
PlayerMessage()
          Parameter-less contructor for the message.
PlayerMessage(PlayerMessage original)
          Cloning constructor from the full message.
PlayerMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, String Jmx, String Name, String Action, boolean Visible, cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation, cz.cuni.amis.pogamut.base3d.worldview.object.Location Location, cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity, int Team, String Weapon, boolean Crouched, int Firing, String EmotLeft, String EmotCenter, String EmotRight, String Bubble, String Anim)
          Creates new instance of the message Player.
 
Method Summary
 String getAction()
          Atomic action this bot is doing (BDI).
 String getAnim()
          For UE2.
 String getBubble()
          For UE2.
 String getEmotCenter()
          For UE2.
 String getEmotLeft()
          For UE2.
 String getEmotRight()
          For UE2.
 int getFiring()
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          Unique Id of the player.
 String getJmx()
          Exported just for control server.
 PlayerLocal getLocal()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          An absolute location of the player within the map.
 String getName()
          Human readable name of the player.
 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
          Which direction the player is facing in absolute terms.
 PlayerShared getShared()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 PlayerStatic getStatic()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 int getTeam()
          What team the player is on.
 cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
          Absolute velocity of the player as a vector of movement per one game second.
 String getWeapon()
          Class of the weapon the player is holding.
 boolean isCrouched()
          True if the bot is crouched.
 boolean isVisible()
          If the player is in the field of view of the bot.
protected  void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player
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 cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
Unique Id of the player.


Id_Set

protected boolean Id_Set
Whether property 'Id' was received from GB2004.


Jmx

protected String Jmx
Exported just for control server. Holds jmx address we need to connect to when we want to debug our bot.


Jmx_Set

protected boolean Jmx_Set
Whether property 'Jmx' was received from GB2004.


Name

protected String Name
Human readable name of the player.


Name_Set

protected boolean Name_Set
Whether property 'Name' was received from GB2004.


Action

protected String Action
Atomic action this bot is doing (BDI).


Action_Set

protected boolean Action_Set
Whether property 'Action' was received from GB2004.


Visible

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


Visible_Set

protected boolean Visible_Set
Whether property 'Visible' was received from GB2004.


Rotation

protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation
Which direction the player is facing in absolute terms.


Rotation_Set

protected boolean Rotation_Set
Whether property 'Rotation' was received from GB2004.


Location

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
An absolute location of the player within the map.


Location_Set

protected boolean Location_Set
Whether property 'Location' was received from GB2004.


Velocity

protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
Absolute velocity of the player as a vector of movement per one game second.


Velocity_Set

protected boolean Velocity_Set
Whether property 'Velocity' was received from GB2004.


Team

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


Team_Set

protected boolean Team_Set
Whether property 'Team' was received from GB2004.


Weapon

protected String Weapon
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.


Weapon_Set

protected boolean Weapon_Set
Whether property 'Weapon' was received from GB2004.


Crouched

protected boolean Crouched
True if the bot is crouched.


Crouched_Set

protected boolean Crouched_Set
Whether property 'Crouched' was received from GB2004.


Firing

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


Firing_Set

protected boolean Firing_Set
Whether property 'Firing' was received from GB2004.


EmotLeft

protected String EmotLeft
For UE2. Holds left emoticon of the bot, "None" means none set.


EmotLeft_Set

protected boolean EmotLeft_Set
Whether property 'EmotLeft' was received from GB2004.


EmotCenter

protected String EmotCenter
For UE2. Holds center emoticon of the bot, "None" means none set.


EmotCenter_Set

protected boolean EmotCenter_Set
Whether property 'EmotCenter' was received from GB2004.


EmotRight

protected String EmotRight
For UE2. Holds right emoticon of the bot, "None" means none set.


EmotRight_Set

protected boolean EmotRight_Set
Whether property 'EmotRight' was received from GB2004.


Bubble

protected String Bubble
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.


Bubble_Set

protected boolean Bubble_Set
Whether property 'Bubble' was received from GB2004.


Anim

protected String Anim
For UE2. Current played animation of the bot.


Anim_Set

protected boolean Anim_Set
Whether property 'Anim' was received from GB2004.

Constructor Detail

PlayerMessage

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


PlayerMessage

public PlayerMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                     String Jmx,
                     String Name,
                     String Action,
                     boolean Visible,
                     cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation,
                     cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
                     cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity,
                     int Team,
                     String Weapon,
                     boolean Crouched,
                     int Firing,
                     String EmotLeft,
                     String EmotCenter,
                     String EmotRight,
                     String Bubble,
                     String Anim)
Creates new instance of the message Player. 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). Corresponding GameBots message is PLR.

Parameters:
Id - Unique Id of the player.
Jmx - Exported just for control server. Holds jmx address we need to connect to when we want to debug our bot.
Name - Human readable name of the player.
Action - Atomic action this bot is doing (BDI).
Visible - If the player is in the field of view of the bot.
Rotation - Which direction the player is facing in absolute terms.
Location - An absolute location of the player within the map.
Velocity - Absolute velocity of the player as a vector of movement per one game second.
Team - What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.
Weapon - 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.
Crouched - True if the bot is crouched.
Firing - 0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
EmotLeft - For UE2. Holds left emoticon of the bot, "None" means none set.
EmotCenter - For UE2. Holds center emoticon of the bot, "None" means none set.
EmotRight - For UE2. Holds right emoticon of the bot, "None" means none set.
Bubble - For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.
Anim - For UE2. Current played animation of the bot.

PlayerMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Description copied from class: Player
Unique Id of the player.

Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
Specified by:
getId in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent
Specified by:
getId in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getId in class Player

getJmx

public String getJmx()
Description copied from class: Player
Exported just for control server. Holds jmx address we need to connect to when we want to debug our bot.

Specified by:
getJmx in class Player

getName

public String getName()
Description copied from class: Player
Human readable name of the player.

Specified by:
getName in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getName in interface IPerson
Specified by:
getName in class Player

getAction

public String getAction()
Description copied from class: Player
Atomic action this bot is doing (BDI).

Specified by:
getAction in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getAction in class Player

isVisible

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

Specified by:
isVisible in interface cz.cuni.amis.pogamut.base3d.worldview.object.IViewable
Specified by:
isVisible in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
isVisible in class Player

getRotation

public cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
Description copied from class: Player
Which direction the player is facing in absolute terms.

Specified by:
getRotation in interface cz.cuni.amis.pogamut.base3d.worldview.object.IRotable
Specified by:
getRotation in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getRotation in class Player

getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Description copied from class: Player
An absolute location of the player within the map.

Specified by:
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocated
Specified by:
getLocation in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getLocation in class Player

getVelocity

public cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
Description copied from class: Player
Absolute velocity of the player as a vector of movement per one game second.

Specified by:
getVelocity in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive
Specified by:
getVelocity in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getVelocity in class Player

getTeam

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

Specified by:
getTeam in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getTeam in class Player

getWeapon

public String getWeapon()
Description copied from class: Player
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 interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getWeapon in class Player

isCrouched

public boolean isCrouched()
Description copied from class: Player
True if the bot is crouched.

Specified by:
isCrouched in class Player

getFiring

public int getFiring()
Description copied from class: Player
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).

Specified by:
getFiring in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Specified by:
getFiring in class Player

getEmotLeft

public String getEmotLeft()
Description copied from class: Player
For UE2. Holds left emoticon of the bot, "None" means none set.

Specified by:
getEmotLeft in class Player

getEmotCenter

public String getEmotCenter()
Description copied from class: Player
For UE2. Holds center emoticon of the bot, "None" means none set.

Specified by:
getEmotCenter in class Player

getEmotRight

public String getEmotRight()
Description copied from class: Player
For UE2. Holds right emoticon of the bot, "None" means none set.

Specified by:
getEmotRight in class Player

getBubble

public String getBubble()
Description copied from class: Player
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.

Specified by:
getBubble in class Player

getAnim

public String getAnim()
Description copied from class: Player
For UE2. Current played animation of the bot.

Specified by:
getAnim in class Player

getLocal

public PlayerLocal getLocal()
Specified by:
getLocal in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getShared

public PlayerShared getShared()
Specified by:
getShared in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getStatic

public PlayerStatic getStatic()
Specified by:
getStatic in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

update

public cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
Specified by:
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent

getLocalEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getSharedEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getStaticEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class Player

toHtmlString

public String toHtmlString()
Specified by:
toHtmlString in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
Overrides:
toHtmlString in class Player


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