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

Package class diagram package GiveItem
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.GiveItem

public class GiveItem
extends CommandMessage

Representation of the GameBots2004 command GIVE. Bot gives an item to other bot (regardless of the automatic pickup settings). Note that other bot must be within reach - less than 200 ut units away (approx. 2 meters). Bot receives message GIVERES with the result of this command - if it was successfull or not.


Field Summary
protected  UnrealId Id
          Id of the bot we want to give item to.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  String Type
          Class of the item, e.g.
 
Constructor Summary
GiveItem()
          Creates new instance of command GiveItem.
GiveItem(GiveItem original)
          Cloning constructor.
GiveItem(UnrealId Id, String Type)
          Creates new instance of command GiveItem.
 
Method Summary
 UnrealId getId()
          Id of the bot we want to give item to.
 String getType()
          Class of the item, e.g.
 GiveItem setId(UnrealId Id)
          Id of the bot we want to give item to.
 GiveItem setType(String Type)
          Class of the item, e.g.
 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 UnrealId Id
Id of the bot we want to give item to.


Type

protected String Type
Class of the item, e.g. "GBEmohawk.ItemBall" (without quotes) we want to give to the bot.

Constructor Detail

GiveItem

public GiveItem(UnrealId Id,
                String Type)
Creates new instance of command GiveItem. Bot gives an item to other bot (regardless of the automatic pickup settings). Note that other bot must be within reach - less than 200 ut units away (approx. 2 meters). Bot receives message GIVERES with the result of this command - if it was successfull or not. Corresponding GameBots message for this command is GIVE.

Parameters:
Id - Id of the bot we want to give item to.
Type - Class of the item, e.g. "GBEmohawk.ItemBall" (without quotes) we want to give to the bot.

GiveItem

public GiveItem()
Creates new instance of command GiveItem. Bot gives an item to other bot (regardless of the automatic pickup settings). Note that other bot must be within reach - less than 200 ut units away (approx. 2 meters). Bot receives message GIVERES with the result of this command - if it was successfull or not. Corresponding GameBots message for this command is GIVE.

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


GiveItem

public GiveItem(GiveItem original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the bot we want to give item to.


setId

public GiveItem setId(UnrealId Id)
Id of the bot we want to give item to.


getType

public String getType()
Class of the item, e.g. "GBEmohawk.ItemBall" (without quotes) we want to give to the bot.


setType

public GiveItem setType(String Type)
Class of the item, e.g. "GBEmohawk.ItemBall" (without quotes) we want to give to the bot.


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.