cz.cuni.amis.pogamut.defcon.communication.messages.commands
Class SetActionTarget

Package class diagram package SetActionTarget
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
          extended by cz.cuni.amis.pogamut.defcon.communication.messages.commands.SetActionTarget

public class SetActionTarget
extends DefConCommand

Sets action target of a unit.


Constructor Summary
SetActionTarget(int unitId, int targetUnitId, DefConLocation location)
          Creates new instance of command SetActionTarget.
SetActionTarget(SetActionTarget original)
          Cloning constructor...
 
Method Summary
 DefConLocation getLocation()
          Attack target of the unit.
 int getTargetUnitId()
          Target of the unit.
 int getUnitId()
          Id of unit to set target of.
 void perform()
          Performs the command - to be used only by the DefConCommandExecutor.
 SetActionTarget setLocation(DefConLocation location)
          Attack target of the unit.
 SetActionTarget setTargetUnitId(int targetUnitId)
          Target of the unit.
 SetActionTarget setUnitId(int unitId)
          Id of unit to set target of.
 String toHtmlString()
          Returns message in html format.
 String toString()
          Returns human readable serialization of the message.
 
Methods inherited from class cz.cuni.amis.pogamut.defcon.communication.messages.commands.DefConCommand
getStringizedFields, toMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetActionTarget

public SetActionTarget(int unitId,
                       int targetUnitId,
                       DefConLocation location)
Creates new instance of command SetActionTarget. Sets action target of a unit.

Parameters:
unitId - Id of unit to set target of.
targetUnitId - Target of the unit.
location - Attack target of the unit.

SetActionTarget

public SetActionTarget(SetActionTarget original)
Cloning constructor...

Parameters:
original -
Method Detail

getUnitId

public int getUnitId()
Id of unit to set target of.

Returns:
int

setUnitId

public SetActionTarget setUnitId(int unitId)
Id of unit to set target of.

Parameters:
unitId -
Returns:
this object, allows you to chain setters

getTargetUnitId

public int getTargetUnitId()
Target of the unit.

Returns:
int

setTargetUnitId

public SetActionTarget setTargetUnitId(int targetUnitId)
Target of the unit.

Parameters:
targetUnitId -
Returns:
this object, allows you to chain setters

getLocation

public DefConLocation getLocation()
Attack target of the unit.

Returns:
DefConLocation

setLocation

public SetActionTarget setLocation(DefConLocation location)
Attack target of the unit.

Parameters:
location -
Returns:
this object, allows you to chain setters

perform

public void perform()
Performs the command - to be used only by the DefConCommandExecutor.

Specified by:
perform in class DefConCommand

toString

public String toString()
Returns human readable serialization of the message.

Overrides:
toString in class CommandMessage
Returns:
human readable string

toHtmlString

public String toHtmlString()
Returns message in html format.

Returns:
html message


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.