cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class ChangeTeam

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.ChangeTeam

public class ChangeTeam
extends CommandMessage

Representation of the GameBots2004 command CHANGETEAM. Command for changing the bot team. Responds with TEAMCHANGE message. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed).


Field Summary
protected  UnrealId Id
          Id of the target bot (won't be parsed if sent to bot connection).
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.Integer Team
          This is the team we want to change to (0 for red, 1 for blue, etc.).
 
Constructor Summary
ChangeTeam()
          Creates new instance of command ChangeTeam.
ChangeTeam(ChangeTeam original)
          Cloning constructor.
ChangeTeam(UnrealId Id, java.lang.Integer Team)
          Creates new instance of command ChangeTeam.
 
Method Summary
 UnrealId getId()
          Id of the target bot (won't be parsed if sent to bot connection).
 java.lang.Integer getTeam()
          This is the team we want to change to (0 for red, 1 for blue, etc.).
 ChangeTeam setId(UnrealId Id)
          Id of the target bot (won't be parsed if sent to bot connection).
 ChangeTeam setTeam(java.lang.Integer Team)
          This is the team we want to change to (0 for red, 1 for blue, etc.).
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

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

See Also:
Constant Field Values

Id

protected UnrealId Id
Id of the target bot (won't be parsed if sent to bot connection).


Team

protected java.lang.Integer Team
This is the team we want to change to (0 for red, 1 for blue, etc.).

Constructor Detail

ChangeTeam

public ChangeTeam(UnrealId Id,
                  java.lang.Integer Team)
Creates new instance of command ChangeTeam. Command for changing the bot team. Responds with TEAMCHANGE message. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Corresponding GameBots message for this command is CHANGETEAM.

Parameters:
Id - Id of the target bot (won't be parsed if sent to bot connection).
Team - This is the team we want to change to (0 for red, 1 for blue, etc.).

ChangeTeam

public ChangeTeam()
Creates new instance of command ChangeTeam. Command for changing the bot team. Responds with TEAMCHANGE message. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Corresponding GameBots message for this command is CHANGETEAM.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


ChangeTeam

public ChangeTeam(ChangeTeam original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the target bot (won't be parsed if sent to bot connection).


setId

public ChangeTeam setId(UnrealId Id)
Id of the target bot (won't be parsed if sent to bot connection).


getTeam

public java.lang.Integer getTeam()
This is the team we want to change to (0 for red, 1 for blue, etc.).


setTeam

public ChangeTeam setTeam(java.lang.Integer Team)
This is the team we want to change to (0 for red, 1 for blue, etc.).


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()