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

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

public class Rotate
extends CommandMessage

Representation of the GameBots2004 command ROTATE. Turns the bot by a specified amount.


Field Summary
protected  java.lang.Integer Amount
          Amount in UT units to rotate.
protected  java.lang.String Axis
          If provided as "Vertical", rotation will be done to Pitch (up/down).
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
 
Constructor Summary
Rotate()
          Creates new instance of command Rotate.
Rotate(java.lang.Integer Amount, java.lang.String Axis)
          Creates new instance of command Rotate.
Rotate(Rotate original)
          Cloning constructor.
 
Method Summary
 java.lang.Integer getAmount()
          Amount in UT units to rotate.
 java.lang.String getAxis()
          If provided as "Vertical", rotation will be done to Pitch (up/down).
 Rotate setAmount(java.lang.Integer Amount)
          Amount in UT units to rotate.
 Rotate setAxis(java.lang.String Axis)
          If provided as "Vertical", rotation will be done to Pitch (up/down).
 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

Amount

protected java.lang.Integer Amount
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


Axis

protected java.lang.String Axis
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).

Constructor Detail

Rotate

public Rotate(java.lang.Integer Amount,
              java.lang.String Axis)
Creates new instance of command Rotate. Turns the bot by a specified amount. Corresponding GameBots message for this command is ROTATE.

Parameters:
Amount - Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).
Axis - If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).

Rotate

public Rotate()
Creates new instance of command Rotate. Turns the bot by a specified amount. Corresponding GameBots message for this command is ROTATE.

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


Rotate

public Rotate(Rotate original)
Cloning constructor.

Parameters:
original -
Method Detail

getAmount

public java.lang.Integer getAmount()
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


setAmount

public Rotate setAmount(java.lang.Integer Amount)
Amount in UT units to rotate. May be negative to rotate counter clockwise. This rotation is relatively added to bot current rotation, then the shortest turn to achieve this new rotation will be performed (so the maximum turn you can achive is to turn back by supporting value 32778 or -32778).


getAxis

public java.lang.String getAxis()
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).


setAxis

public Rotate setAxis(java.lang.String Axis)
If provided as "Vertical", rotation will be done to Pitch (up/down). Any other value, or not provided, and rotation will be to Yaw (left/right).


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()