colony.common
Interface DroidHandle


public interface DroidHandle

Interface and link between droid software and its associated droid hardware.

Object implementing the DroidHandle interface provide droid software with hardware information such as the value of properties (e.g. hit points) and available abilities. DroidHandles also allow droid software to issue commands to hardware through the use of supported abilities. See PlayerConstants for a list of available ability monikers.


Method Summary
 Moniker[] getAbilities()
           
 Goal getGoal()
           
 MapPoint getMapBounds()
           
 Moniker getMoniker()
           
 long getTime()
           
 Object[] useAbility(Moniker abilityMoniker, Moniker targetMoniker, Object parameter)
          Commands the droid hardware to use an ability on a specified target and with a specified parameter.
 

Method Detail

getAbilities

public Moniker[] getAbilities()
Returns:
the monikers of all abilities supported by the droid hardware.

getGoal

public Goal getGoal()
Returns:
the goal of the current map.

getMapBounds

public MapPoint getMapBounds()
Returns:
the MapPoint with the maximum x and y coordinates on the map.

getMoniker

public Moniker getMoniker()
Returns:
the moniker associated with the droid hardware.

getTime

public long getTime()
Returns:
the time of the current match in engine cycles.

useAbility

public Object[] useAbility(Moniker abilityMoniker,
                           Moniker targetMoniker,
                           Object parameter)
Commands the droid hardware to use an ability on a specified target and with a specified parameter. See PlayerConstants for a list of available ability monikers.

Parameters:
abilityMoniker - moniker of the ability to use.
targetMoniker - moniker of target to receive ability (may be null for certain abilities).
parameter - parameter for ability (may be null for certain abilities.