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

Package class diagram package FlagInfoMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoMessage
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.IViewable, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event

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

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

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
 class FlagInfoMessage.FlagInfoLocalMessage
          Implementation of the local part of the GameBots2004 message FLG, used to facade FLGMessage.
 class FlagInfoMessage.FlagInfoSharedMessage
          Implementation of the shared part of the GameBots2004 message FLG, used to facade FLGMessage.
 class FlagInfoMessage.FlagInfoStaticMessage
          Implementation of the static part of the GameBots2004 message FLG, used to facade FLGMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
FlagInfo.FlagInfoUpdate, FlagInfo.ObjectDisappeared
 
Field Summary
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Holder
          Id of player/bot holding the flag.
protected  boolean Holder_Set
          Whether property 'Holder' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          An unique Id for this flag, assigned by the game.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
          An absolute location of the flag (Sent if we can actually see the flag).
protected  boolean Location_Set
          Whether property 'Location' was received from GB2004.
protected  String State
          Represents the state the flag is in.
protected  boolean State_Set
          Whether property 'State' was received from GB2004.
protected  Integer Team
          The owner team of this flag.
protected  boolean Team_Set
          Whether property 'Team' was received from GB2004.
protected  cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId
           
protected  boolean Visible
          True if the bot can see the flag.
protected  boolean Visible_Set
          Whether property 'Visible' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
PROTOTYPE, SimTime
 
Constructor Summary
FlagInfoMessage()
          Parameter-less contructor for the message.
FlagInfoMessage(FlagInfoMessage original)
          Cloning constructor from the full message.
FlagInfoMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, cz.cuni.amis.pogamut.base3d.worldview.object.Location Location, cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Holder, Integer Team, boolean Visible, String State)
          Creates new instance of the message FlagInfo.
 
Method Summary
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getHolder()
          Id of player/bot holding the flag.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          An unique Id for this flag, assigned by the game.
 FlagInfoLocal 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 flag (Sent if we can actually see the flag).
 FlagInfoShared getShared()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 String getState()
          Represents the state the flag is in.
 FlagInfoStatic getStatic()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 Integer getTeam()
          The owner team of this flag.
 cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()
           
 boolean isVisible()
          True if the bot can see the flag.
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.FlagInfo
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
An unique Id for this flag, assigned by the game.


Id_Set

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


Location

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
An absolute location of the flag (Sent if we can actually see the flag).


Location_Set

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


Holder

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Holder
Id of player/bot holding the flag. (Sent if we can actually see the flag and the flag is being carried, or if the flag is being carried by us).


Holder_Set

protected boolean Holder_Set
Whether property 'Holder' was received from GB2004.


Team

protected Integer Team
The owner team of this flag.


Team_Set

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


Visible

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


Visible_Set

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


State

protected String State
Represents the state the flag is in. Can be "Held", "Dropped" or "Home" (note that the first letter does not have to be in upper case!).


State_Set

protected boolean State_Set
Whether property 'State' was received from GB2004.

Constructor Detail

FlagInfoMessage

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


FlagInfoMessage

public FlagInfoMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                       cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
                       cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Holder,
                       Integer Team,
                       boolean Visible,
                       String State)
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 is FLG.

Parameters:
Id - An unique Id for this flag, assigned by the game.
Location - An absolute location of the flag (Sent if we can actually see the flag).
Holder - Id of player/bot holding the flag. (Sent if we can actually see the flag and the flag is being carried, or if the flag is being carried by us).
Team - The owner team of this flag.
Visible - True if the bot can see the flag.
State - Represents the state the flag is in. Can be "Held", "Dropped" or "Home" (note that the first letter does not have to be in upper case!).

FlagInfoMessage

public FlagInfoMessage(FlagInfoMessage 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: FlagInfo
An unique Id for this flag, assigned by the game.

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 class FlagInfo

getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Description copied from class: FlagInfo
An absolute location of the flag (Sent if we can actually see the flag).

Specified by:
getLocation in class FlagInfo

getHolder

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getHolder()
Description copied from class: FlagInfo
Id of player/bot holding the flag. (Sent if we can actually see the flag and the flag is being carried, or if the flag is being carried by us).

Specified by:
getHolder in class FlagInfo

getTeam

public Integer getTeam()
Description copied from class: FlagInfo
The owner team of this flag.

Specified by:
getTeam in class FlagInfo

isVisible

public boolean isVisible()
Description copied from class: FlagInfo
True if the bot can see the flag.

Specified by:
isVisible in interface cz.cuni.amis.pogamut.base3d.worldview.object.IViewable
Specified by:
isVisible in class FlagInfo

getState

public String getState()
Description copied from class: FlagInfo
Represents the state the flag is in. Can be "Held", "Dropped" or "Home" (note that the first letter does not have to be in upper case!).

Specified by:
getState in class FlagInfo

getLocal

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

getShared

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

getStatic

public FlagInfoStatic 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 FlagInfo

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class FlagInfo


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