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

Package class diagram package 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  String Id
          Unique Id of weapon to switch to.
static 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(String Id)
          Creates new instance of command ChangeWeapon.
 
Method Summary
 String getId()
          Unique Id of weapon to switch to.
 ChangeWeapon setId(String Id)
          Unique Id of weapon to switch to.
 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 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(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 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(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 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.