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

Package class diagram package FlagInfoCompositeImpl
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.FlagInfoCompositeImpl
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, 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.worldview.object.ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event

public class FlagInfoCompositeImpl
extends FlagInfo

Composite implementation of the FLG abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.

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
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
FlagInfo.FlagInfoUpdate, FlagInfo.ObjectDisappeared
 
Field Summary
protected  FlagInfoLocalImpl partLocal
           
protected  FlagInfoStaticImpl partStatic
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
PROTOTYPE, SimTime
 
Constructor Summary
FlagInfoCompositeImpl()
          Parameter-less contructor for the message.
FlagInfoCompositeImpl(FlagInfoCompositeImpl original)
          Cloning constructor.
FlagInfoCompositeImpl(FlagInfoLocalImpl partLocal, FlagInfoSharedImpl partShared, FlagInfoStaticImpl partStatic)
          Composite-impl constructor.
 
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.base3d.worldview.object.Location getLocation()
          An absolute location of the flag (Sent if we can actually see the flag).
 FlagInfoShared getShared()
           
 String getState()
          Represents the state the flag is in.
 FlagInfoStatic getStatic()
           
 Integer getTeam()
          The owner team of this flag.
 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.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfo
createDisappearEvent, getSimTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

partStatic

protected FlagInfoStaticImpl partStatic

partLocal

protected FlagInfoLocalImpl partLocal
Constructor Detail

FlagInfoCompositeImpl

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


FlagInfoCompositeImpl

public FlagInfoCompositeImpl(FlagInfoLocalImpl partLocal,
                             FlagInfoSharedImpl partShared,
                             FlagInfoStaticImpl partStatic)
Composite-impl constructor. It assembles the message from its three fragments - local/shared/static.

Parameters:
partLocal - local-part of the message
partShared - shared-part of the message
partStatic - static-part of the message

FlagInfoCompositeImpl

public FlagInfoCompositeImpl(FlagInfoCompositeImpl original)
Cloning constructor.

Parameters:
original -
Method Detail

setSimTime

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

Overrides:
setSimTime in class FlagInfo

getStatic

public FlagInfoStatic getStatic()

getLocal

public FlagInfoLocal getLocal()

getShared

public FlagInfoShared getShared()

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.worldview.object.IWorldObject
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

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.