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

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

public class FlagInfoLocalImpl
extends FlagInfoLocal

Implementation of the local part of the GameBots2004 message FLG.

Complete message documentation: Synchronous message. FlagInfo contains all info about the flag in the CTF game mode. Is not sent in other game types.


Nested Class Summary
static class FlagInfoLocalImpl.FlagInfoLocalUpdate
           
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoLocal
FlagInfoLocal.ObjectDisappeared
 
Field Summary
protected  UnrealId Id
          An unique Id for this flag, assigned by the game.
protected  boolean Reachable
          True if the bot can run here directly, false otherwise.
protected  boolean Visible
          True if the bot can see the flag.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoLocal
SimTime
 
Constructor Summary
FlagInfoLocalImpl()
          Parameter-less contructor for the message.
FlagInfoLocalImpl(FlagInfo original)
          Cloning constructor from the full message.
FlagInfoLocalImpl(FlagInfoLocal original)
          Cloning constructor from the message part.
FlagInfoLocalImpl(FlagInfoLocalImpl original)
          Cloning constructor from the full message.
FlagInfoLocalImpl(UnrealId Id, boolean Reachable, boolean Visible)
          Creates new instance of the message FlagInfo.
 
Method Summary
 FlagInfoLocalImpl clone()
           
 UnrealId getId()
          An unique Id for this flag, assigned by the game.
 FlagInfoLocalImpl getLocal()
           
 ISharedWorldObject getShared()
           
 IStaticWorldObject getStatic()
           
 boolean isReachable()
          True if the bot can run here directly, false otherwise.
 boolean isVisible()
          True if the bot can see the flag.
 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.FlagInfoLocal
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
An unique Id for this flag, assigned by the game.


Reachable

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


Visible

protected boolean Visible
True if the bot can see the flag.

Constructor Detail

FlagInfoLocalImpl

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


FlagInfoLocalImpl

public FlagInfoLocalImpl(UnrealId Id,
                         boolean Reachable,
                         boolean Visible)
Creates new instance of the message FlagInfo. Synchronous message. FlagInfo contains all info about the flag in the CTF game mode. Is not sent in other game types. Corresponding GameBots message (local part) is FLG.

Parameters:
Id - An unique Id for this flag, assigned by the game.
Reachable - True if the bot can run here directly, false otherwise.
Visible - True if the bot can see the flag.

FlagInfoLocalImpl

public FlagInfoLocalImpl(FlagInfo original)
Cloning constructor from the full message.

Parameters:
original -

FlagInfoLocalImpl

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

Parameters:
original -

FlagInfoLocalImpl

public FlagInfoLocalImpl(FlagInfoLocal original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

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

Overrides:
setSimTime in class FlagInfoLocal

clone

public FlagInfoLocalImpl clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class FlagInfoLocal

getId

public UnrealId getId()
An unique Id for this flag, assigned by the game.

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

isReachable

public boolean isReachable()
True if the bot can run here directly, false otherwise.

Specified by:
isReachable in class FlagInfoLocal

isVisible

public boolean isVisible()
True if the bot can see the flag.

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

getLocal

public FlagInfoLocalImpl getLocal()
Overrides:
getLocal in class FlagInfoLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class FlagInfoLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class FlagInfoLocal

toString

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

toHtmlString

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