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

Package class diagram package FlagInfoMessage.FlagInfoSharedMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoMessage.FlagInfoSharedMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject, Cloneable
Enclosing class:
FlagInfoMessage

public class FlagInfoMessage.FlagInfoSharedMessage
extends FlagInfoShared

Implementation of the shared part of the GameBots2004 message FLG, used to facade FLGMessage.

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


Field Summary
protected  UnrealIdProperty myHolder
          Id of player/bot holding the flag.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.LocationProperty myLocation
          An absolute location of the flag (Sent if we can actually see the flag).
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.StringProperty myState
          Represents the state the flag is in.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myTeam
          The owner team of this flag.
protected  HashMap<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoShared
HolderPropertyToken, LocationPropertyToken, SharedPropertyTokens, SimTime, StatePropertyToken, TeamPropertyToken
 
Constructor Summary
FlagInfoMessage.FlagInfoSharedMessage()
           
 
Method Summary
 FlagInfoMessage.FlagInfoSharedMessage clone()
           
 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.
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          An absolute location of the flag (Sent if we can actually see the flag).
 Map<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> getProperties()
           
 cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty getProperty(cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId id)
           
 String getState()
          Represents the state the flag is in.
 Integer getTeam()
          The owner team of this flag.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.FlagInfoShared
getCompositeClass, getSimTime, setSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected HashMap<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> propertyMap

myLocation

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.LocationProperty myLocation
An absolute location of the flag (Sent if we can actually see the flag).


myHolder

protected UnrealIdProperty myHolder
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).


myTeam

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myTeam
The owner team of this flag.


myState

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.StringProperty myState
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!).

Constructor Detail

FlagInfoMessage.FlagInfoSharedMessage

public FlagInfoMessage.FlagInfoSharedMessage()
Method Detail

clone

public FlagInfoMessage.FlagInfoSharedMessage clone()
Specified by:
clone in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject
Specified by:
clone in class FlagInfoShared

getProperty

public cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty getProperty(cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId id)

getProperties

public Map<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> getProperties()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
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 FlagInfoShared

getLocation

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

Specified by:
getLocation in class FlagInfoShared

getHolder

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getHolder()
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 FlagInfoShared

getTeam

public Integer getTeam()
The owner team of this flag.

Specified by:
getTeam in class FlagInfoShared

getState

public String getState()
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 FlagInfoShared

toString

public String toString()
Overrides:
toString in class FlagInfoShared

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class FlagInfoShared


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