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

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

public class ChangeWeapon
extends CommandMessage

Representation of the GameBots2004 command CHANGEWEAPON. Switch the bots weapon to another.


Field Summary
protected  java.lang.String Id
          Unique Id of weapon to switch to.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
 
Constructor Summary
ChangeWeapon()
          Creates new instance of command ChangeWeapon.
ChangeWeapon(ChangeWeapon original)
          Cloning constructor.
ChangeWeapon(java.lang.String Id)
          Creates new instance of command ChangeWeapon.
 
Method Summary
 java.lang.String getId()
          Unique Id of weapon to switch to.
 ChangeWeapon setId(java.lang.String Id)
          Unique Id of weapon to switch to.
 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 java.lang.String Id
Unique Id of weapon to switch to. If you just send "Best" as Id, the server will pick your best weapon that still has ammo for you. Obtain Unique Id's from AIN messages. Be carefull, the weapon Id in bots inventory is different from the Ids of weapons that are lying in the map!

Constructor Detail

ChangeWeapon

public ChangeWeapon(java.lang.String Id)
Creates new instance of command ChangeWeapon. Switch the bots weapon to another. Corresponding GameBots message for this command is CHANGEWEAPON.

Parameters:
Id - Unique Id of weapon to switch to. If you just send "Best" as Id, the server will pick your best weapon that still has ammo for you. Obtain Unique Id's from AIN messages. Be carefull, the weapon Id in bots inventory is different from the Ids of weapons that are lying in the map!

ChangeWeapon

public ChangeWeapon()
Creates new instance of command ChangeWeapon. Switch the bots weapon to another. Corresponding GameBots message for this command is CHANGEWEAPON.

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


ChangeWeapon

public ChangeWeapon(ChangeWeapon original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public java.lang.String getId()
Unique Id of weapon to switch to. If you just send "Best" as Id, the server will pick your best weapon that still has ammo for you. Obtain Unique Id's from AIN messages. Be carefull, the weapon Id in bots inventory is different from the Ids of weapons that are lying in the map!


setId

public ChangeWeapon setId(java.lang.String Id)
Unique Id of weapon to switch to. If you just send "Best" as Id, the server will pick your best weapon that still has ammo for you. Obtain Unique Id's from AIN messages. Be carefull, the weapon Id in bots inventory is different from the Ids of weapons that are lying in the map!


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()