A B C D E F G H I L M N O P R S T U V W X Y

A

add(Direction) - Method in class battlecode.common.MapLocation
Returns a new MapLocation object representing a location one square from this one in the given direction.
add(Direction, int) - Method in class battlecode.common.MapLocation
Returns a new MapLocation object representing a location multiple squares from this one in the given direction.
add(int, int) - Method in class battlecode.common.MapLocation
Returns a new MapLocation object translated from this location by a fixed amount
addMatchObservation(String) - Method in interface battlecode.common.RobotController
Adds a custom observation to the match file, such that when it is analyzed, this observation will appear.
attackAngle - Variable in enum battlecode.common.RobotType
The range of angles that this robot can attack.
attackCosHalfTheta - Variable in enum battlecode.common.RobotType
 
attackDelay - Variable in enum battlecode.common.RobotType
The number of turns that it takes this robot to attack.
attackPower - Variable in enum battlecode.common.RobotType
The amount of damage that this robot does when it attacks.
attackRadiusMaxSquared - Variable in enum battlecode.common.RobotType
The square of the maximum distance that the robot can attack.
attackRadiusMinSquared - Variable in enum battlecode.common.RobotType
The square of the minimum distance that the robot can attack.
attackSquare(MapLocation, RobotLevel) - Method in interface battlecode.common.RobotController
Attacks the given location and height.

B

battlecode.common - package battlecode.common
 
breakpoint() - Method in interface battlecode.common.RobotController
If breakpoints are enabled, calling this method causes the game engine to pause execution at the end of this round, until the user decides to resume execution.
broadcast(Message) - Method in interface battlecode.common.RobotController
Adds a message for your robot to broadcast.
BROADCAST_COST_PER_BYTE - Static variable in interface battlecode.common.GameConstants
Additional cost per byte of message size
BROADCAST_FIXED_COST - Static variable in interface battlecode.common.GameConstants
Fixed cost to send a message
BROADCAST_RADIUS_SQUARED - Static variable in interface battlecode.common.GameConstants
The square of the maximum distance a message can travel.
BYTECODE_LIMIT - Static variable in interface battlecode.common.GameConstants
The base number of bytecodes a robot can execute each round

C

canAttack(RobotLevel) - Method in enum battlecode.common.RobotType
Returns true if the robot can attack robots at the given level.
canAttackAir - Variable in enum battlecode.common.RobotType
Whether or not the robot can attack air units.
canAttackGround - Variable in enum battlecode.common.RobotType
Whether or not the robot can attack ground units.
canAttackSquare(MapLocation) - Method in interface battlecode.common.RobotController
Returns true if the given location is within this robot's attack range.
canMove(Direction) - Method in interface battlecode.common.RobotController
Tells whether this robot can move in the given direction.
canSenseObject(GameObject) - Method in interface battlecode.common.RobotController
Returns true if o is within sensor range.
canSenseSquare(MapLocation) - Method in interface battlecode.common.RobotController
Returns true if this robot can sense the location loc.
Clock - Class in battlecode.common
A robot's internal clock, used for measuring "time" in bytecodes and rounds.
clone() - Method in class battlecode.common.Message

D

Direction - Enum in battlecode.common
This enumeration represents a direction from one MapLocation to another.
direction - Variable in class battlecode.common.RobotInfo
The direction this Robot is facing.
directionTo(MapLocation) - Method in class battlecode.common.MapLocation
Returns the Direction from this MapLocation to location.
DISCONNECTED_NODE_DAMAGE - Static variable in interface battlecode.common.GameConstants
The amount of damage dealt each turn to a node that is not connected to its team's power core.
DISRUPTER_DELAY - Static variable in interface battlecode.common.GameConstants
The increase in a unit's attack timeout when it is hit by a DISRUPTER.
distanceSquaredTo(MapLocation) - Method in class battlecode.common.MapLocation
Computes the square of the distance from this location to the specified location.
dx - Variable in enum battlecode.common.Direction
 
dy - Variable in enum battlecode.common.Direction
 

E

energon - Variable in class battlecode.common.RobotInfo
The energon of this Robot.
equals(Object) - Method in class battlecode.common.MapLocation
Two MapLocations are regarded as equal iff their coordinates are the same.
EXCEPTION_BYTECODE_PENALTY - Static variable in interface battlecode.common.GameConstants
The bytecode penalty that is imposed each time an exception is thrown

F

flux - Variable in class battlecode.common.RobotInfo
The flux of this Robot.

G

GameActionException - Exception in battlecode.common
An exception caused by a robot's interaction with the game world.
GameActionException(GameActionExceptionType, String) - Constructor for exception battlecode.common.GameActionException
Creates a GameActionException with the given type and message.
GameActionExceptionType - Enum in battlecode.common
Enumerates the possible errors in GameWorld interactions that cause a GameActionException to be thrown.
GameConstants - Interface in battlecode.common
Defines constants that affect gameplay.
GameObject - Interface in battlecode.common
A GameObject instance represents an object in the game world.
getAllMessages() - Method in interface battlecode.common.RobotController
Retrieves an array of all the messages in your incoming message queue.
getBytecodeNum() - Static method in class battlecode.common.Clock
Returns the number of bytecodes the current robot has executed since the beginning of the current round.
getBytecodesLeft() - Static method in class battlecode.common.Clock
Returns the number of bytecodes this robot has left in this round.
getControlBits() - Method in interface battlecode.common.RobotController
Gets this robot's 'control bits' for debugging purposes.
getDirection() - Method in interface battlecode.common.RobotController
Gets the direction this robot is currently facing.
getEnergon() - Method in interface battlecode.common.RobotController
Gets the current energon of this robot.
getFlux() - Method in interface battlecode.common.RobotController
Returns this robot's current flux level.
getFluxCost() - Method in class battlecode.common.Message
Returns the cost in flux to broadcast the message.
getHeight() - Method in enum battlecode.common.RobotLevel
Returns an integral height-wise ordering of the height type.
getID() - Method in interface battlecode.common.GameObject
Gives the globally unique integer ID of this GameObject
getLocation() - Method in interface battlecode.common.PowerNode
Returns this power node's location.
getLocation() - Method in interface battlecode.common.RobotController
Gets the current location of this robot.
getMaxEnergon() - Method in interface battlecode.common.RobotController
Gets the maximum energon of this robot.
getNextMessage() - Method in interface battlecode.common.RobotController
Retrieve the next message waiting in your incoming message queue.
getNumBytes() - Method in class battlecode.common.Message
Returns the number of bytes in this message, which can be used to determine the cost of broadcasting it in energon.
getRobot() - Method in interface battlecode.common.RobotController
Use this method to access your robot.
getRobotLevel() - Method in interface battlecode.common.GameObject
Gives the level at which this object appears.
getRoundNum() - Static method in class battlecode.common.Clock
Returns the current round number, where round 0 is the first round of the match.
getTeam() - Method in interface battlecode.common.GameObject
Gives this GameObject's team
getTeam() - Method in interface battlecode.common.RobotController
Gets the Team of this robot.
getTeamMemory() - Method in interface battlecode.common.RobotController
Returns the team memory from the last game of the match.
getType() - Method in exception battlecode.common.GameActionException
Gives the type of gameworld interaction that caused this GameActionException, which was specified when this instance was constructed.
getType() - Method in interface battlecode.common.RobotController
Gets this robot's type.

H

hasBroadcasted() - Method in interface battlecode.common.RobotController
Returns true if this robot has already broadcasted this turn.
hashCode() - Method in class battlecode.common.MapLocation
hashCode() - Method in class battlecode.common.RobotInfo
 

I

ints - Variable in class battlecode.common.Message
An array of ints to broadcast.
isAdjacentTo(MapLocation) - Method in class battlecode.common.MapLocation
Determines whether this location is adjacent to the specified location.
isAirborne() - Method in enum battlecode.common.RobotType
Returns true if this robot's level is RobotLevel.IN_AIR.
isAttackActive() - Method in interface battlecode.common.RobotController
Returns true if this robot's attack cooldown is nonzero.
isDiagonal() - Method in enum battlecode.common.Direction
Determines whether or not this direction is a diagonal one.
isMovementActive() - Method in interface battlecode.common.RobotController
Returns true if this robot's movement cooldown is nonzero.
isTraversableAtHeight(RobotLevel) - Method in enum battlecode.common.TerrainTile
Returns true if robots at the given height can traverse this terrain tile.

L

level - Variable in enum battlecode.common.RobotType
The robot's level.
location - Variable in class battlecode.common.RobotInfo
The location of this Robot.
locations - Variable in class battlecode.common.Message
An array of MapLocations to broadcast.

M

MAP_MAX_HEIGHT - Static variable in interface battlecode.common.GameConstants
The maximum possible map height.
MAP_MAX_WIDTH - Static variable in interface battlecode.common.GameConstants
The maxiumum possible map width.
MAP_MIN_HEIGHT - Static variable in interface battlecode.common.GameConstants
The minimum possible map height.
MAP_MIN_WIDTH - Static variable in interface battlecode.common.GameConstants
The minumum possible map width.
MapLocation - Class in battlecode.common
This class is an immutable representation of two-dimensional coordinates in the battlecode world.
MapLocation(int, int) - Constructor for class battlecode.common.MapLocation
Creates a new MapLocation representing the location with the given coordinates.
MAX_POWER_NODES - Static variable in interface battlecode.common.GameConstants
The maximum number of power nodes that can appear on a map.
MAX_PRODUCTION - Static variable in interface battlecode.common.GameConstants
The maximum amount of flux that an archon can produce in a turn.
MAX_ROUND_LIMIT - Static variable in interface battlecode.common.GameConstants
The maximum possible round at which nodes may begin taking end-of-round damage
maxEnergon - Variable in enum battlecode.common.RobotType
The maximum amount of energon the robot can have.
maxFlux - Variable in enum battlecode.common.RobotType
The maximum amount of flux the robot can have.
Message - Class in battlecode.common
A Message is an object that can be broadcast to other robots.
Message() - Constructor for class battlecode.common.Message
Constructs an instance with a null value in each field.
MIN_POWER_NODES - Static variable in interface battlecode.common.GameConstants
The minimum number of power nodes that can appear on a map.
MIN_PRODUCTION - Static variable in interface battlecode.common.GameConstants
The minimum amount of flux that an archon can produce in a turn.
MIN_ROUND_LIMIT - Static variable in interface battlecode.common.GameConstants
The minimum possible round at which nodes may begin taking end-of-round damage
moveBackward() - Method in interface battlecode.common.RobotController
Queues a backward movement to be performed at the end of this robot's turn.
moveCost - Variable in enum battlecode.common.RobotType
The cost in flux to move the robot one square.
moveDelayDiagonal - Variable in enum battlecode.common.RobotType
The number of turns it takes the robot to move diagonally.
moveDelayOrthogonal - Variable in enum battlecode.common.RobotType
The number of turns it takes the robot to move orthogonally.
moveForward() - Method in interface battlecode.common.RobotController
Queues a forward movement to be performed at the end of this robot's turn.

N

neighbors() - Method in interface battlecode.common.PowerNode
Returns the locations of all power nodes that are connected to this power node.
NUMBER_OF_ARCHONS - Static variable in interface battlecode.common.GameConstants
The number of archons each team starts with.
NUMBER_OF_INDICATOR_STRINGS - Static variable in interface battlecode.common.GameConstants
The number of indicator strings that a player can associate with a robot

O

opponent() - Method in enum battlecode.common.Team
Determines the team that is the opponent of this team.
opposite() - Method in enum battlecode.common.Direction
Computes the direction opposite this one.

P

powerCoreTeam() - Method in interface battlecode.common.PowerNode
If this node is the power core for a team, returns that team.
PowerNode - Interface in battlecode.common
 
PRODUCTION_PENALTY_R2 - Static variable in interface battlecode.common.GameConstants
An archon's production will decrease if it is within this distance squared of an allied archon.

R

regen - Variable in class battlecode.common.RobotInfo
true if this robot is scheduled to regenerate at the beginning of its next turn.
REGEN_AMOUNT - Static variable in interface battlecode.common.GameConstants
The amount of energon gained when a unit regenerates.
REGEN_COST - Static variable in interface battlecode.common.GameConstants
The cost in flux to regenerate.
regenerate() - Method in interface battlecode.common.RobotController
Causes each allied robot within its attack radius to regenerate GameConstants.REGEN_AMOUNT energon at the beginning of its next turn.
resign() - Method in interface battlecode.common.RobotController
Causes your team to lose the game.
Robot - Interface in battlecode.common
A Robot instance represents a robot in the game world.
robot - Variable in class battlecode.common.RobotInfo
The robot that was sensed.
RobotController - Interface in battlecode.common
A RobotController allows contestants to make their robot sense and interact with the game world.
RobotInfo - Class in battlecode.common
Struct that stores basic information that was 'sensed' of another Robot.
RobotInfo(Robot, MapLocation, double, double, Direction, RobotType, Team, boolean, int, int) - Constructor for class battlecode.common.RobotInfo
 
RobotLevel - Enum in battlecode.common
This enumeration distinguishes objects that are on the ground, or in the air at a given location.
RobotType - Enum in battlecode.common
 
rotateLeft() - Method in enum battlecode.common.Direction
Computes the direction 45 degrees to the left (counter-clockwise) of this one.
rotateRight() - Method in enum battlecode.common.Direction
Computes the direction 45 degrees to the right (clockwise) of this one.
roundsUntilAttackIdle() - Method in interface battlecode.common.RobotController
Returns the number of rounds until this robot's attack cooldown reaches zero.
roundsUntilAttackIdle - Variable in class battlecode.common.RobotInfo
 
roundsUntilMovementIdle() - Method in interface battlecode.common.RobotController
Returns the number of rounds until this robot's movement cooldown reaches zero.
roundsUntilMovementIdle - Variable in class battlecode.common.RobotInfo
 

S

senseAlliedArchons() - Method in interface battlecode.common.RobotController
Returns the locations of all the archons on the calling robot's team.
senseAlliedPowerNodes() - Method in interface battlecode.common.RobotController
Returns an array containing all of the power nodes owned by this robot's team.
senseCapturablePowerNodes() - Method in interface battlecode.common.RobotController
Returns an array containing the locations of all of the nodes that this team can capture.
senseConnected(PowerNode) - Method in interface battlecode.common.RobotController
Returns true if the node p is connected to this robot's team's power core.
senseLocationOf(GameObject) - Method in interface battlecode.common.RobotController
Sense the location of the object o.
senseNearbyGameObjects(Class<T>) - Method in interface battlecode.common.RobotController
Sense objects of type type that are within this sensor's range.
senseObjectAtLocation(MapLocation, RobotLevel) - Method in interface battlecode.common.RobotController
Returns the object at the given location and height, or null if there is no object there.
senseOpponentConnected(PowerNode) - Method in interface battlecode.common.RobotController
Returns true if the node p is connected to this robot's team's opponent's power core.
senseOwned(PowerNode) - Method in interface battlecode.common.RobotController
Returns true if there is an allied tower at the power node p.
sensePowerCore() - Method in interface battlecode.common.RobotController
Returns this robot's team's power core.
senseRobotInfo(Robot) - Method in interface battlecode.common.RobotController
Sense the RobotInfo for the robot r.
senseTerrainTile(MapLocation) - Method in interface battlecode.common.RobotController
Senses the terrain at loc, if loc was ever within this robot's sensor range.
sensorAngle - Variable in enum battlecode.common.RobotType
The range of angles that the robot can sense.
sensorCosHalfTheta - Variable in enum battlecode.common.RobotType
 
sensorRadiusSquared - Variable in enum battlecode.common.RobotType
The square of the maximum distance that the robot can sense.
setDirection(Direction) - Method in interface battlecode.common.RobotController
Queues a direction change to be performed at the end of this robot's turn.
setIndicatorString(int, String) - Method in interface battlecode.common.RobotController
Sets one of this robot's 'indicator strings' for debugging purposes.
setTeamMemory(int, long) - Method in interface battlecode.common.RobotController
Sets the team's "memory", which is saved for the next game in the match.
setTeamMemory(int, long, long) - Method in interface battlecode.common.RobotController
Sets this team's "memory".
spawn(RobotType) - Method in interface battlecode.common.RobotController
Queues a spawn action to be performed at the end of this robot's turn.
spawnCost - Variable in enum battlecode.common.RobotType
The amount of flux needed to spawn the robot.
strings - Variable in class battlecode.common.Message
An array of Strings to broadcast.
subtract(Direction) - Method in class battlecode.common.MapLocation
Returns a new MapLocation object representing a location one square from this one in the opposite of the given direction.
suicide() - Method in interface battlecode.common.RobotController
Kills your robot and ends the current round.

T

team - Variable in class battlecode.common.RobotInfo
The team of this Robot.
Team - Enum in battlecode.common
This enum represents the team of a GameObject; each GameObject has exactly one team.
TEAM_MEMORY_LENGTH - Static variable in interface battlecode.common.GameConstants
The number of longs that your team can remember between games.
TerrainTile - Enum in battlecode.common
Represents data of the terrain of a location on the map.
TIME_LIMIT_DAMAGE - Static variable in interface battlecode.common.GameConstants
The total amount of damage to be divided evenly among each team's power nodes each turn once the time limit is reached.
toString() - Method in class battlecode.common.MapLocation
transferFlux(MapLocation, RobotLevel, double) - Method in interface battlecode.common.RobotController
Transfers the specified amount of flux to the robot at location loc and RobotLevel height.
type - Variable in class battlecode.common.RobotInfo
The type of this Robot.

U

UNIT_UPKEEP - Static variable in interface battlecode.common.GameConstants
The upkeep cost per turn for each unit that is not an archon or tower.

V

valueOf(String) - Static method in enum battlecode.common.Direction
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum battlecode.common.GameActionExceptionType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in class battlecode.common.MapLocation
 
valueOf(String) - Static method in enum battlecode.common.RobotLevel
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum battlecode.common.RobotType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum battlecode.common.Team
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum battlecode.common.TerrainTile
Returns the enum constant of this type with the specified name.
values() - Static method in enum battlecode.common.Direction
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum battlecode.common.GameActionExceptionType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum battlecode.common.RobotLevel
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum battlecode.common.RobotType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum battlecode.common.Team
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum battlecode.common.TerrainTile
Returns an array containing the constants of this enum type, in the order they are declared.

W

WAKE_DELAY - Static variable in interface battlecode.common.GameConstants
The number of turns before a newly spawned robot can move or attack.

X

x - Variable in class battlecode.common.MapLocation
The x-coordinate.

Y

y - Variable in class battlecode.common.MapLocation
The y-coordinate.
yield() - Method in interface battlecode.common.RobotController
Ends the current round.
YIELD_BONUS - Static variable in interface battlecode.common.GameConstants
The maximum fraction of upkeep that can be regained by yielding

A B C D E F G H I L M N O P R S T U V W X Y