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.
changeSpeed(double)
- Change pawn's speed.
getAcceleration()
- Get the maximum rate at which pawn's speed can change per tick
getAngleAcceleration()
- Get the rate at which the pawn can turn (in radians)
getCurrentSpeed()
- Get pawn's current speed
getEnergy()
- Get the object which tracks the pawn's energy.
getIdentity()
- Get a list of names the pawn goes by
getMaxSpeed()
- Get the maximum speed pawn can travel
getScanners()
- Get list of pawn's scanners.
getTools()
- Get list of pawn's tools.
getWeapons()
- Get list of pawn's weapons.
turnLeft(double)
- Change direction pawn is headed in by turning left by the given angle.
turnRight(double)
- Change direction pawn is headed in by turning right by the given angle.
getCurrentSpeed
public double getCurrentSpeed()
Get pawn's current speed
getMaxSpeed
public double getMaxSpeed()
Get the maximum speed pawn can travel
getAcceleration
public double getAcceleration()
Get the maximum rate at which pawn's speed can change per tick
getAngleAcceleration
public double getAngleAcceleration()
Get the rate at which the pawn can turn (in radians)
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
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
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
getEnergy
public Energy getEnergy()
Get the object which tracks the pawn's energy.
getScanners
public java.util.Enumeration getScanners()
Get list of pawn's scanners.
getWeapons
public java.util.Enumeration getWeapons()
Get list of pawn's weapons.
getTools
public java.util.Enumeration getTools()
Get list of pawn's tools.
getIdentity
public Identity getIdentity()
Get a list of names the pawn goes by
All Packages Class Hierarchy This Package Previous Next Index