cz.cuni.amis.pogamut.udk.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.udk.communication.messages.gbcommands.ChangeTeam

public class ChangeTeam
extends CommandMessage

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 command is CHANGETEAM.


Field Summary
protected  UnrealId Id
          Id of the target bot (won't be parsed if sent to bot connection).
protected  int 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, int 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).
 int 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(int 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

Id

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


Team

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

Constructor Detail

ChangeTeam

public ChangeTeam(UnrealId Id,
                  int 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!


ChangeTeam

public ChangeTeam(ChangeTeam original)
Cloning constructor.

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 int getTeam()
This is the team we want to change to (0 for red, 1 for blue, etc.).


setTeam

public ChangeTeam setTeam(int 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 © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.