All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.loki3.cyber.pawn.Pawn


public interface Pawn
extends Unit
Pawn is the primary public interface for controlling your pawn and getting information about it.


Method Index

 o changeSpeed(double)
Change pawn's speed.
 o getAcceleration()
Get the maximum rate at which pawn's speed can change per tick
 o getAngleAcceleration()
Get the rate at which the pawn can turn (in radians)
 o getCurrentSpeed()
Get pawn's current speed
 o getEnergy()
Get the object which tracks the pawn's energy.
 o getIdentity()
Get a list of names the pawn goes by
 o getMaxSpeed()
Get the maximum speed pawn can travel
 o getScanners()
Get list of pawn's scanners.
 o getTools()
Get list of pawn's tools.
 o getWeapons()
Get list of pawn's weapons.
 o turnLeft(double)
Change direction pawn is headed in by turning left by the given angle.
 o turnRight(double)
Change direction pawn is headed in by turning right by the given angle.

Method Detail

 o getCurrentSpeed
public double getCurrentSpeed()
          Get pawn's current speed
 o getMaxSpeed
public double getMaxSpeed()
          Get the maximum speed pawn can travel
 o getAcceleration
public double getAcceleration()
          Get the maximum rate at which pawn's speed can change per tick
 o getAngleAcceleration
public double getAngleAcceleration()
          Get the rate at which the pawn can turn (in radians)
 o changeSpeed
public boolean changeSpeed(double speed)
          Change pawn's speed. Note it may take awhile for pawn to achieve new speed.
Parameters:
speed - value from 0 to getMaxSpeed()
Returns:
false if pawn cannot reach desired speed
 o turnLeft
public boolean turnLeft(double angle)
          Change direction pawn is headed in by turning left by the given angle. Note it may take awhile for pawn to turn in given direction
Parameters:
angle - angle in radians
Returns:
false if pawn cannot turn in desired direction
 o turnRight
public boolean turnRight(double angle)
          Change direction pawn is headed in by turning right by the given angle. Note it may take awhile for pawn to turn in given direction
Parameters:
angle - angle in radians
Returns:
false if pawn cannot turn in desired direction
 o getEnergy
public Energy getEnergy()
          Get the object which tracks the pawn's energy.
 o getScanners
public java.util.Enumeration getScanners()
          Get list of pawn's scanners.
 o getWeapons
public java.util.Enumeration getWeapons()
          Get list of pawn's weapons.
 o getTools
public java.util.Enumeration getTools()
          Get list of pawn's tools.
 o getIdentity
public Identity getIdentity()
          Get a list of names the pawn goes by

All Packages  Class Hierarchy  This Package  Previous  Next  Index