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

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

public class DriveTo
extends CommandMessage

Representation of the GameBots2004 command DRIVETO. Only command that is able to move vehicles. Turn towards target specified and move directly to its destination. If there is an obstacle between target and current position, you will hit it on your way to target (no obstacle avoidance).


Field Summary
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  UnrealId Target
          The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id).
 
Constructor Summary
DriveTo()
          Creates new instance of command DriveTo.
DriveTo(DriveTo original)
          Cloning constructor.
DriveTo(UnrealId Target)
          Creates new instance of command DriveTo.
 
Method Summary
 UnrealId getTarget()
          The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id).
 DriveTo setTarget(UnrealId Target)
          The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id).
 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
The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id). Recommended is to specify NavPoint Id as it is always unique. Won't work with player IDs.

Constructor Detail

DriveTo

public DriveTo(UnrealId Target)
Creates new instance of command DriveTo. Only command that is able to move vehicles. Turn towards target specified and move directly to its destination. If there is an obstacle between target and current position, you will hit it on your way to target (no obstacle avoidance). Corresponding GameBots message for this command is DRIVETO.

Parameters:
Target - The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id). Recommended is to specify NavPoint Id as it is always unique. Won't work with player IDs.

DriveTo

public DriveTo()
Creates new instance of command DriveTo. Only command that is able to move vehicles. Turn towards target specified and move directly to its destination. If there is an obstacle between target and current position, you will hit it on your way to target (no obstacle avoidance). Corresponding GameBots message for this command is DRIVETO.

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


DriveTo

public DriveTo(DriveTo original)
Cloning constructor.

Parameters:
original -
Method Detail

getTarget

public UnrealId getTarget()
The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id). Recommended is to specify NavPoint Id as it is always unique. Won't work with player IDs.


setTarget

public DriveTo setTarget(UnrealId Target)
The unique id of a NavPoint, Mover or item (beware, not all of the items have unique id). Recommended is to specify NavPoint Id as it is always unique. Won't work with player IDs.


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()