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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLocal
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLocalImpl
All Implemented Interfaces:
IWorldObject, ILocalViewable, ILocalWorldObject, ILocalGBViewable, java.lang.Cloneable

public class PlayerLocalImpl
extends PlayerLocal

Implementation of the local part of the GameBots2004 message PLR.

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
static class PlayerLocalImpl.PlayerLocalUpdate
           
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLocal
PlayerLocal.ObjectDisappeared
 
Field Summary
protected  UnrealId Id
          Unique Id of the player.
protected  java.lang.String Jmx
          Exported just for control server.
protected  boolean Reachable
          True if the bot can run to this other player directly, false otherwise.
protected  boolean Visible
          If the player is in the field of view of the bot.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLocal
SimTime
 
Constructor Summary
PlayerLocalImpl()
          Parameter-less contructor for the message.
PlayerLocalImpl(Player original)
          Cloning constructor from the full message.
PlayerLocalImpl(PlayerLocal original)
          Cloning constructor from the message part.
PlayerLocalImpl(PlayerLocalImpl original)
          Cloning constructor from the full message.
PlayerLocalImpl(UnrealId Id, java.lang.String Jmx, boolean Visible, boolean Reachable)
          Creates new instance of the message Player.
 
Method Summary
 PlayerLocalImpl clone()
           
 UnrealId getId()
          Unique Id of the player.
 java.lang.String getJmx()
          Exported just for control server.
 PlayerLocalImpl getLocal()
           
 ISharedWorldObject getShared()
           
 IStaticWorldObject getStatic()
           
 boolean isReachable()
          True if the bot can run to this other player directly, false otherwise.
 boolean isVisible()
          If the player is in the field of view of the bot.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerLocal
createDisappearEvent, getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Id

protected UnrealId Id
Unique Id of the player.


Jmx

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


Visible

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


Reachable

protected boolean Reachable
True if the bot can run to this other player directly, false otherwise. Possible reasons for false: pit or obstacle between the two characters.

Constructor Detail

PlayerLocalImpl

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


PlayerLocalImpl

public PlayerLocalImpl(UnrealId Id,
                       java.lang.String Jmx,
                       boolean Visible,
                       boolean Reachable)
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 (local part) 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.
Visible - If the player is in the field of view of the bot.
Reachable - True if the bot can run to this other player directly, false otherwise. Possible reasons for false: pit or obstacle between the two characters.

PlayerLocalImpl

public PlayerLocalImpl(Player original)
Cloning constructor from the full message.

Parameters:
original -

PlayerLocalImpl

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

Parameters:
original -

PlayerLocalImpl

public PlayerLocalImpl(PlayerLocal original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

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

Overrides:
setSimTime in class PlayerLocal

clone

public PlayerLocalImpl clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class PlayerLocal

getId

public UnrealId getId()
Unique Id of the player.

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

getJmx

public java.lang.String getJmx()
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 PlayerLocal

isVisible

public boolean isVisible()
If the player is in the field of view of the bot.

Specified by:
isVisible in interface ILocalViewable
Specified by:
isVisible in class PlayerLocal
Returns:

isReachable

public boolean isReachable()
True if the bot can run to this other player directly, false otherwise. Possible reasons for false: pit or obstacle between the two characters.

Specified by:
isReachable in class PlayerLocal

getLocal

public PlayerLocalImpl getLocal()
Overrides:
getLocal in class PlayerLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class PlayerLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class PlayerLocal

toString

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

toHtmlString

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