robocraft.common
Class RobotType

java.lang.Object
  extended byrobocraft.common.CommonEnum
      extended byrobocraft.common.ObjectType
          extended byrobocraft.common.RobotType
All Implemented Interfaces:
java.io.Serializable

public class RobotType
extends ObjectType

RobotType represents the type of Robot objects that can exist in the game.

The only instances of this class are those found in the static fields described below. This means that instances can always be meaningfully compared using ==.

See Also:
ObjectType, GameObject.getType(), Serialized Form

Field Summary
static RobotType BOMBER
           
static RobotType FALCON
           
static RobotType SENTRY
           
static RobotType TANK
           
 
Fields inherited from class robocraft.common.ObjectType
FLAG, MINE
 
Method Summary
 double attackAngle()
          returns the angle of this robot's attack range.
 double attackCosHalfTheta()
          returns the cosine of half the attack angle.
 int attackDelay()
          returns the amount of rounds this robot will take to attack.
 double attackPower()
          returns the amount of energon this robot will drain from an enemy during an attack.
 int attackRadiusMax()
          returns the maximum distance from this robot's location to a MapLocation in its attack range.
 int attackRadiusMin()
          returns the minimum distance from this robot's location to a MapLocation in its attack range.
 int broadcastRadius()
          returns the maximum distance from this robot another robot can be to receive broadcasted messages.
 int bytecodesPerRound()
          returns the number of bytecodes this robot can process per round.
 boolean canAttackAir()
          returns whether this robot will inflict damage on an airborne robot at a MapLocation that this robot attacks.
 boolean canAttackGround()
          returns whether this robot will inflict damage on a ground robot at a MapLocation that this robot attacks.
 boolean canCarryFlag()
          returns whether this robot can pick up flags.
 boolean canLayMine()
          returns whether this robot can lay mines.
 double fullEnergon()
           
 boolean isAirborne()
          returns whether this robot is airborne.
 double maxEnergon()
          returns the maximum energon level of this robot.
 int mineDelay()
           
 int moveDelayDiagonal()
          returns the number of rounds this robot will take to move in a diagonal Direction.
 int moveDelayOrthogonal()
          returns the number of rounds this robot will take to move in an orthogonal (non-diagonal) Direction.
 double sensorAngle()
          returns the angle of this robot's sensor range.
 double sensorCosHalfTheta()
          returns the cosine of half the sensor angle.
 int sensorRadius()
          returns the maximum distance from this robot's location to a MapLocation in its sensor range.
 double spawnCost()
          returns the amount of energon needed by another robot to spawn this robot.
 int spawnDelay()
          returns the number of rounds for which this robot is active after spawning.
 double startEnergon()
          returns the initial energon level of this robot.
 int wakeDelay()
          returns the number of rounds for which this robot is active after being spawned.
 
Methods inherited from class robocraft.common.ObjectType
isRobot, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SENTRY

public static final RobotType SENTRY

TANK

public static final RobotType TANK

FALCON

public static final RobotType FALCON

BOMBER

public static final RobotType BOMBER
Method Detail

attackAngle

public double attackAngle()
returns the angle of this robot's attack range.

Returns:
the angle of this robot's attack range.

attackCosHalfTheta

public double attackCosHalfTheta()
returns the cosine of half the attack angle.

Returns:
the cosine of half the attack angle.

attackDelay

public int attackDelay()
returns the amount of rounds this robot will take to attack.

Returns:
the amount of rounds this robot will take to attack.

attackPower

public double attackPower()
returns the amount of energon this robot will drain from an enemy during an attack.

Returns:
the amount of energon this robot will drain from an enemy during an attack.

attackRadiusMax

public int attackRadiusMax()
returns the maximum distance from this robot's location to a MapLocation in its attack range.

Returns:
the maximum distance from this robot's location to a MapLocation in its attack range.

attackRadiusMin

public int attackRadiusMin()
returns the minimum distance from this robot's location to a MapLocation in its attack range.

Returns:
the minimum distance from this robot's location to a MapLocation in its attack range.

broadcastRadius

public int broadcastRadius()
returns the maximum distance from this robot another robot can be to receive broadcasted messages.

Returns:
the maximum distance from this robot another robot can be to receive broadcasted messages.

bytecodesPerRound

public int bytecodesPerRound()
returns the number of bytecodes this robot can process per round.

Returns:
the number of bytecodes this robot can process per round.

canAttackAir

public boolean canAttackAir()
returns whether this robot will inflict damage on an airborne robot at a MapLocation that this robot attacks.

Returns:
whether this robot will inflict damage on an airborne robot at a MapLocation that this robot attacks.

canAttackGround

public boolean canAttackGround()
returns whether this robot will inflict damage on a ground robot at a MapLocation that this robot attacks.

Returns:
whether this robot will inflict damage on a ground robot at a MapLocation that this robot attacks.

canCarryFlag

public boolean canCarryFlag()
returns whether this robot can pick up flags.

Returns:
whether this robot can pick up flags.

canLayMine

public boolean canLayMine()
returns whether this robot can lay mines.

Returns:
whether this robot can lay mines.

fullEnergon

public double fullEnergon()

isAirborne

public boolean isAirborne()
returns whether this robot is airborne.

Returns:
whether this robot is airborne.

maxEnergon

public double maxEnergon()
returns the maximum energon level of this robot.

Returns:
the maximum energon level of this robot.

mineDelay

public int mineDelay()

moveDelayDiagonal

public int moveDelayDiagonal()
returns the number of rounds this robot will take to move in a diagonal Direction.

Returns:
the number of rounds this robot will take to move in a diagonal Direction.

moveDelayOrthogonal

public int moveDelayOrthogonal()
returns the number of rounds this robot will take to move in an orthogonal (non-diagonal) Direction.

Returns:
the number of rounds this robot will take to move in an orthogonal (non-diagonal) Direction.

sensorAngle

public double sensorAngle()
returns the angle of this robot's sensor range.

Returns:
the angle of this robot's sensor range.

sensorCosHalfTheta

public double sensorCosHalfTheta()
returns the cosine of half the sensor angle.

Returns:
the cosine of half the sensor angle.

sensorRadius

public int sensorRadius()
returns the maximum distance from this robot's location to a MapLocation in its sensor range.

Returns:
the maximum distance from this robot's location to a MapLocation in its sensor range.

spawnCost

public double spawnCost()
returns the amount of energon needed by another robot to spawn this robot.

Returns:
the amount of energon needed by another robot to spawn this robot.

spawnDelay

public int spawnDelay()
returns the number of rounds for which this robot is active after spawning.

Returns:
the number of rounds for which this robot is active after spawning.

startEnergon

public double startEnergon()
returns the initial energon level of this robot.

Returns:
the initial energon level of this robot.

wakeDelay

public int wakeDelay()
returns the number of rounds for which this robot is active after being spawned.

Returns:
the number of rounds for which this robot is active after being spawned.