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

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

public class GiveInventory
extends CommandMessage

Representation of the GameBots2004 command GIVEINV. Gives inventory from one bot to another. Bot can give just owned items. (in his inventory chain). He can't give weapon he is wielding right now. This command is not fully tested yet and has issues.


Field Summary
protected  java.lang.String ItemId
          Id of the item in the inventory chain of the giver.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  UnrealId Target
          Id of the receiving bot.
 
Constructor Summary
GiveInventory()
          Creates new instance of command GiveInventory.
GiveInventory(GiveInventory original)
          Cloning constructor.
GiveInventory(UnrealId Target, java.lang.String ItemId)
          Creates new instance of command GiveInventory.
 
Method Summary
 java.lang.String getItemId()
          Id of the item in the inventory chain of the giver.
 UnrealId getTarget()
          Id of the receiving bot.
 GiveInventory setItemId(java.lang.String ItemId)
          Id of the item in the inventory chain of the giver.
 GiveInventory setTarget(UnrealId Target)
          Id of the receiving bot.
 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

Target

protected UnrealId Target
Id of the receiving bot.


ItemId

protected java.lang.String ItemId
Id of the item in the inventory chain of the giver.

Constructor Detail

GiveInventory

public GiveInventory(UnrealId Target,
                     java.lang.String ItemId)
Creates new instance of command GiveInventory. Gives inventory from one bot to another. Bot can give just owned items. (in his inventory chain). He can't give weapon he is wielding right now. This command is not fully tested yet and has issues. Corresponding GameBots message for this command is GIVEINV.

Parameters:
Target - Id of the receiving bot.
ItemId - Id of the item in the inventory chain of the giver.

GiveInventory

public GiveInventory()
Creates new instance of command GiveInventory. Gives inventory from one bot to another. Bot can give just owned items. (in his inventory chain). He can't give weapon he is wielding right now. This command is not fully tested yet and has issues. Corresponding GameBots message for this command is GIVEINV.

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


GiveInventory

public GiveInventory(GiveInventory original)
Cloning constructor.

Parameters:
original -
Method Detail

getTarget

public UnrealId getTarget()
Id of the receiving bot.


setTarget

public GiveInventory setTarget(UnrealId Target)
Id of the receiving bot.


getItemId

public java.lang.String getItemId()
Id of the item in the inventory chain of the giver.


setItemId

public GiveInventory setItemId(java.lang.String ItemId)
Id of the item in the inventory chain of the giver.


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()