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

Package class diagram package 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 String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  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, 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).
 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(Integer Team)
          This is the team we want to change to (0 for red, 1 for blue, etc.).
 String toHtmlString()
           
 String toMessage()
           
 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 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 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,
                  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 Integer getTeam()
This is the team we want to change to (0 for red, 1 for blue, etc.).


setTeam

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


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


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