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

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

public class InitializeObserver
extends CommandMessage

Representation of the GameBots2004 command INIT. Message you'll send at the beginning of the communication to start observing a player. You need to supply either name or ID of the player to observe. If you are already observing a player, you will stop observing that player and start observing the player specified by this message.


Field Summary
protected  java.lang.String Id
          The ID of the player you want to observe.
protected  java.lang.String Name
          Name of the player you wannt to observe.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
 
Constructor Summary
InitializeObserver()
          Creates new instance of command InitializeObserver.
InitializeObserver(InitializeObserver original)
          Cloning constructor.
InitializeObserver(java.lang.String Name, java.lang.String Id)
          Creates new instance of command InitializeObserver.
 
Method Summary
 java.lang.String getId()
          The ID of the player you want to observe.
 java.lang.String getName()
          Name of the player you wannt to observe.
 InitializeObserver setId(java.lang.String Id)
          The ID of the player you want to observe.
 InitializeObserver setName(java.lang.String Name)
          Name of the player you wannt to observe.
 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

Name

protected java.lang.String Name
Name of the player you wannt to observe.


Id

protected java.lang.String Id
The ID of the player you want to observe.

Constructor Detail

InitializeObserver

public InitializeObserver(java.lang.String Name,
                          java.lang.String Id)
Creates new instance of command InitializeObserver. Message you'll send at the beginning of the communication to start observing a player. You need to supply either name or ID of the player to observe. If you are already observing a player, you will stop observing that player and start observing the player specified by this message. Corresponding GameBots message for this command is INIT.

Parameters:
Name - Name of the player you wannt to observe.
Id - The ID of the player you want to observe.

InitializeObserver

public InitializeObserver()
Creates new instance of command InitializeObserver. Message you'll send at the beginning of the communication to start observing a player. You need to supply either name or ID of the player to observe. If you are already observing a player, you will stop observing that player and start observing the player specified by this message. Corresponding GameBots message for this command is INIT.

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


InitializeObserver

public InitializeObserver(InitializeObserver original)
Cloning constructor.

Parameters:
original -
Method Detail

getName

public java.lang.String getName()
Name of the player you wannt to observe.


setName

public InitializeObserver setName(java.lang.String Name)
Name of the player you wannt to observe.


getId

public java.lang.String getId()
The ID of the player you want to observe.


setId

public InitializeObserver setId(java.lang.String Id)
The ID of the player you want to observe.


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()