cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages
Class TeamScore

Package class diagram package TeamScore
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
          extended by cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.TeamScore
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldObject, IGBWorldObjectEvent, cz.cuni.amis.utils.listener.Event

public class TeamScore
extends GBObjectUpdate
implements IGBWorldObjectEvent, IWorldObject

Synchronous message. Contains the info about team score. Corresponding GameBots message is TES.


Nested Class Summary
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  UnrealId Id
          Message identifier.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  int Score
          The score of the team (can be some special measurement that differs from game type to game type - number of stolen flags in CTF game, number of team frags in TeamGame, etc.)
protected  int Team
          Team identifier.
protected  double Time
           
 
Constructor Summary
TeamScore()
          Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
TeamScore(TeamScore original)
          Cloning constructor.
TeamScore(UnrealId Id, int Team, int Score)
          Creates new instance of command TeamScore.
 
Method Summary
 boolean equals(Object obj)
           
 UnrealId getId()
          Message identifier.
 double getLastSeenTime()
           
 ILocalWorldObject getLocal()
           
 IWorldObject getObject()
          Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).
 int getScore()
          The score of the team (can be some special measurement that differs from game type to game type - number of stolen flags in CTF game, number of team frags in TeamGame, etc.)
 ISharedWorldObject getShared()
           
 long getSimTime()
           
 IStaticWorldObject getStatic()
           
 int getTeam()
          Team identifier.
protected  double getTime()
           
 int hashCode()
           
protected  void setTime(double time)
           
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult update(IWorldObject obj)
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected UnrealId Id
Message identifier.


Team

protected int Team
Team identifier.


Score

protected int Score
The score of the team (can be some special measurement that differs from game type to game type - number of stolen flags in CTF game, number of team frags in TeamGame, etc.)


Time

protected double Time
Constructor Detail

TeamScore

public TeamScore(UnrealId Id,
                 int Team,
                 int Score)
Creates new instance of command TeamScore. Synchronous message. Contains the info about team score. Corresponding GameBots message for this command is .

Parameters:
Id - Message identifier.
Team - Team identifier.
Score - The score of the team (can be some special measurement that differs from game type to game type - number of stolen flags in CTF game, number of team frags in TeamGame, etc.)

TeamScore

public TeamScore(TeamScore original)
Cloning constructor.


TeamScore

public TeamScore()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).

Method Detail

getId

public UnrealId getId()
Message identifier.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject

getTeam

public int getTeam()
Team identifier.


getScore

public int getScore()
The score of the team (can be some special measurement that differs from game type to game type - number of stolen flags in CTF game, number of team frags in TeamGame, etc.)


getTime

protected double getTime()

setTime

protected void setTime(double time)

getLastSeenTime

public double getLastSeenTime()

getLocal

public ILocalWorldObject getLocal()

getShared

public ISharedWorldObject getShared()

getStatic

public IStaticWorldObject getStatic()

getSimTime

public long getSimTime()
Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

update

public IWorldObjectUpdateResult update(IWorldObject obj)
Specified by:
update in interface IWorldObjectUpdatedEvent

getObject

public IWorldObject getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()


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