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

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

public class CommandPlayer
extends CommandMessage

Representation of the GameBots2004 command COMPLR. Commands player's character to perform some action.


Field Summary
protected  java.lang.String Command
          Available: MOVE, TURNTO.
protected  Location FocusLocation
          Applicable for: MOVE.
protected  Location Location
          Applicable for: MOVE, TURNTO.
protected  java.lang.String Player
          Name of the affected player.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Rotation Rotation
          Applicable for: TURNTO.
protected  java.lang.Boolean Walk
          Applicable for: MOVE.
 
Constructor Summary
CommandPlayer()
          Creates new instance of command CommandPlayer.
CommandPlayer(CommandPlayer original)
          Cloning constructor.
CommandPlayer(java.lang.String Player, java.lang.String Command, Location Location, Location FocusLocation, java.lang.Boolean Walk, Rotation Rotation)
          Creates new instance of command CommandPlayer.
 
Method Summary
 java.lang.String getCommand()
          Available: MOVE, TURNTO.
 Location getFocusLocation()
          Applicable for: MOVE.
 Location getLocation()
          Applicable for: MOVE, TURNTO.
 java.lang.String getPlayer()
          Name of the affected player.
 Rotation getRotation()
          Applicable for: TURNTO.
 java.lang.Boolean isWalk()
          Applicable for: MOVE.
 CommandPlayer setCommand(java.lang.String Command)
          Available: MOVE, TURNTO.
 CommandPlayer setFocusLocation(Location FocusLocation)
          Applicable for: MOVE.
 CommandPlayer setLocation(Location Location)
          Applicable for: MOVE, TURNTO.
 CommandPlayer setPlayer(java.lang.String Player)
          Name of the affected player.
 CommandPlayer setRotation(Rotation Rotation)
          Applicable for: TURNTO.
 CommandPlayer setWalk(java.lang.Boolean Walk)
          Applicable for: MOVE.
 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

Player

protected java.lang.String Player
Name of the affected player.


Command

protected java.lang.String Command
Available: MOVE, TURNTO.


Location

protected Location Location
Applicable for: MOVE, TURNTO.


FocusLocation

protected Location FocusLocation
Applicable for: MOVE.


Walk

protected java.lang.Boolean Walk
Applicable for: MOVE. If the character should walk instead of run.


Rotation

protected Rotation Rotation
Applicable for: TURNTO.

Constructor Detail

CommandPlayer

public CommandPlayer(java.lang.String Player,
                     java.lang.String Command,
                     Location Location,
                     Location FocusLocation,
                     java.lang.Boolean Walk,
                     Rotation Rotation)
Creates new instance of command CommandPlayer. Commands player's character to perform some action. Corresponding GameBots message for this command is COMPLR.

Parameters:
Player - Name of the affected player.
Command - Available: MOVE, TURNTO.
Location - Applicable for: MOVE, TURNTO.
FocusLocation - Applicable for: MOVE.
Walk - Applicable for: MOVE. If the character should walk instead of run.
Rotation - Applicable for: TURNTO.

CommandPlayer

public CommandPlayer()
Creates new instance of command CommandPlayer. Commands player's character to perform some action. Corresponding GameBots message for this command is COMPLR.

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


CommandPlayer

public CommandPlayer(CommandPlayer original)
Cloning constructor.

Parameters:
original -
Method Detail

getPlayer

public java.lang.String getPlayer()
Name of the affected player.


setPlayer

public CommandPlayer setPlayer(java.lang.String Player)
Name of the affected player.


getCommand

public java.lang.String getCommand()
Available: MOVE, TURNTO.


setCommand

public CommandPlayer setCommand(java.lang.String Command)
Available: MOVE, TURNTO.


getLocation

public Location getLocation()
Applicable for: MOVE, TURNTO.


setLocation

public CommandPlayer setLocation(Location Location)
Applicable for: MOVE, TURNTO.


getFocusLocation

public Location getFocusLocation()
Applicable for: MOVE.


setFocusLocation

public CommandPlayer setFocusLocation(Location FocusLocation)
Applicable for: MOVE.


isWalk

public java.lang.Boolean isWalk()
Applicable for: MOVE. If the character should walk instead of run.


setWalk

public CommandPlayer setWalk(java.lang.Boolean Walk)
Applicable for: MOVE. If the character should walk instead of run.


getRotation

public Rotation getRotation()
Applicable for: TURNTO.


setRotation

public CommandPlayer setRotation(Rotation Rotation)
Applicable for: TURNTO.


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()