A B C D E 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.
ARTILLERY_SPLASH_RADIUS_SQUARED - Static variable in interface battlecode.common.GameConstants
Radius of artillery splash damage in units squared
ARTILLERY_SPLASH_RATIO - Static variable in interface battlecode.common.GameConstants
Percantage of direct artillery damage that the splash damage does
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) - Method in interface battlecode.common.RobotController
ARTILLERY only 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(int, int) - Method in interface battlecode.common.RobotController
Broadcasts a message to the global message board.
BROADCAST_MAX_CHANNELS - Static variable in interface battlecode.common.GameConstants
The maximum read/write-able of radio channel number
BROADCAST_READ_COST - Static variable in interface battlecode.common.GameConstants
The power cost required to read a message from a single radio channel
BROADCAST_SEND_COST - Static variable in interface battlecode.common.GameConstants
The power cost required to broadcast a message to a single radio channel
BYTECODE_LIMIT - Static variable in interface battlecode.common.GameConstants
The base number of bytecodes a robot can execute each round

C

canAttack - Variable in enum battlecode.common.RobotType
Whether or not the robot can attack units.
canAttack(RobotLevel) - Method in enum battlecode.common.RobotType
Returns true if the robot can attack robots at the given level.
canAttackSquare(MapLocation) - Method in interface battlecode.common.RobotController
ARTILLERY only
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
 
canSenseSquare(MapLocation) - Method in interface battlecode.common.RobotController
Returns true if the given location is within the team's shared sensor range
CAPTURE_POWER_COST - Static variable in interface battlecode.common.GameConstants
The power cost required to begin an encampement capture
CAPTURE_ROUND_DELAY - Static variable in interface battlecode.common.GameConstants
The number of rounds required by a SOLDIER to capture an encampment
captureEncampment(RobotType) - Method in interface battlecode.common.RobotController
Captures the encampment soldier is standing on.
checkResearchProgress(Upgrade) - Method in interface battlecode.common.RobotController
HQ ONLY.
Clock - Class in battlecode.common
A robot's internal clock, used for measuring "time" in bytecodes and rounds.

D

defuseMine(MapLocation) - Method in interface battlecode.common.RobotController
SOLDIER only Defuses a mine on the target square.
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.
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

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.
GENERATOR_POWER_PRODUCTION - Static variable in interface battlecode.common.GameConstants
Additiona power provided by each generator
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.
getEnergon() - Method in interface battlecode.common.RobotController
 
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.RobotController
 
getMapHeight() - Method in interface battlecode.common.RobotController
 
getMapWidth() - Method in interface battlecode.common.RobotController
 
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.
getShields() - Method in interface battlecode.common.RobotController
 
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.
getTeamPower() - Method in interface battlecode.common.RobotController
 
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 (SOLDIER, HQ, etc.)

H

hashCode() - Method in class battlecode.common.MapLocation
hashCode() - Method in class battlecode.common.RobotInfo
 
hasUpgrade(Upgrade) - Method in interface battlecode.common.RobotController
Checks whether a given upgrade has been researched and is available.
HAT_POWER_COST - Static variable in interface battlecode.common.GameConstants
Amount of power required to wear a hat
HQ_POWER_PRODUCTION - Static variable in interface battlecode.common.GameConstants
Base power production per HQ
HQ_SPAWN_DELAY - Static variable in interface battlecode.common.GameConstants
Rounds required to spawn a unit at the start of the game
HQ_SPAWN_DELAY_CONSTANT - Static variable in interface battlecode.common.GameConstants
Constant used to calculate how suppliers factor into the HQ spawn delay

I

isActive() - Method in interface battlecode.common.RobotController
 
isAdjacentTo(MapLocation) - Method in class battlecode.common.MapLocation
Determines whether this location is adjacent to the specified location.
isDiagonal() - Method in enum battlecode.common.Direction
Determines whether or not this direction is a diagonal one.
isEncampment - Variable in enum battlecode.common.RobotType
 
isTraversableAtHeight(RobotLevel) - Method in enum battlecode.common.TerrainTile
Returns true if robots at the given height can traverse this terrain tile.

L

layMine() - Method in interface battlecode.common.RobotController
SOLDIER only Lays mines.
level - Variable in enum battlecode.common.RobotType
The robot's level.
location - Variable in class battlecode.common.RobotInfo
The location of this Robot.

M

main(String[]) - Static method in class battlecode.common.MapEditor
 
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.
MAP_MINIMUM_ENCAMPMENTS - Static variable in interface battlecode.common.GameConstants
A valid map must have at least this many encampment locations.
MapEditor - Class in battlecode.common
 
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.
maxEnergon - Variable in enum battlecode.common.RobotType
The maximum amount of energon the robot can have.
MINE_DAMAGE - Static variable in interface battlecode.common.GameConstants
The amount of damage that a mine deals to a robot standing on it per round
MINE_DAMAGE_RATIO_ABSORBED_BY_SHIELD - Static variable in interface battlecode.common.GameConstants
The percentage of mine damage that shields can absorb
MINE_DEFUSE_DEFUSION_DELAY - Static variable in interface battlecode.common.GameConstants
The number of rounds required by a soldier to defuse a mine if they have DEFUSION upgrade
MINE_DEFUSE_DELAY - Static variable in interface battlecode.common.GameConstants
The number of rounds required by a soldier to defuse a mine
MINE_LAY_DELAY - Static variable in interface battlecode.common.GameConstants
The number of rounds required by a soldier to lay a mine
move(Direction) - Method in interface battlecode.common.RobotController
Move in the given direction if possible.

N

NUMBER_OF_INDICATOR_STRINGS - Static variable in interface battlecode.common.GameConstants
The number of indicator strings that a player can associate with a robot
numRounds - Variable in enum battlecode.common.Upgrade
 

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

POWER_COST_PER_BYTECODE - Static variable in interface battlecode.common.GameConstants
The energy to bytecode converstion rate
POWER_DECAY_RATE - Static variable in interface battlecode.common.GameConstants
The rate at which stockpiled power decays without the FUSION upgrade
POWER_DECAY_RATE_FUSION - Static variable in interface battlecode.common.GameConstants
The rate at which stockpiled energy decays with the FUSION upgrade

R

readBroadcast(int) - Method in interface battlecode.common.RobotController
Retrieves the message stored at the given radio channel.
regen - Variable in class battlecode.common.RobotInfo
true if this robot is scheduled to regenerate at the beginning of its next turn.
researchUpgrade(Upgrade) - Method in interface battlecode.common.RobotController
HQ ONLY.
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 encampment level 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.
ROUND_MAX_LIMIT - Static variable in interface battlecode.common.GameConstants
The maximum possible round at which nodes may begin taking end-of-round damage
ROUND_MIN_LIMIT - Static variable in interface battlecode.common.GameConstants
The minimum possible round at which nodes may begin taking end-of-round damage
roundsUntilActive() - Method in interface battlecode.common.RobotController
 
roundsUntilAttackIdle - Variable in class battlecode.common.RobotInfo
 
roundsUntilMovementIdle - Variable in class battlecode.common.RobotInfo
 

S

senseAllEncampmentSquares() - Method in interface battlecode.common.RobotController
 
senseAlliedEncampmentSquares() - Method in interface battlecode.common.RobotController
 
senseCaptureCost() - Method in interface battlecode.common.RobotController
Checks how much power it costs to start a capture an encampment on this turn
senseEncampmentSquare(MapLocation) - Method in interface battlecode.common.RobotController
Checks if the given map location is an encampment square.
senseEncampmentSquares(MapLocation, int, Team) - Method in interface battlecode.common.RobotController
Senses all encampment squares owned by the given team within the given circular area Allows a team-based filter which can be one of the following parameters: Null - Senses _all_ encampments on the map Neutral - Senses all encampments not owned by the allied team, so neutral or enemy Allied Team - Senses all encampments owned by the allied team Note that you cannot sense all enemy-owned encampments
senseEnemyHQLocation() - Method in interface battlecode.common.RobotController
 
senseEnemyNukeHalfDone() - Method in interface battlecode.common.RobotController
Senses the enemy team's NUKE research progress - only HQ can do this
senseHQLocation() - Method in interface battlecode.common.RobotController
 
senseLocationOf(GameObject) - Method in interface battlecode.common.RobotController
Sense the location of the given object.
senseMine(MapLocation) - Method in interface battlecode.common.RobotController
Senses whether a mine exists at a given location
senseMineLocations(MapLocation, int, Team) - Method in interface battlecode.common.RobotController
Returns all mines within a given search radius specified by the parameters
senseMineRoundsLeft() - Method in interface battlecode.common.RobotController
SOLDIER only Checks how many rounds are left for the current mine being laid, if any.
senseNearbyGameObjects(Class<T>) - Method in interface battlecode.common.RobotController
Returns all game objects of a given type nearby the robot
senseNearbyGameObjects(Class<T>, int) - Method in interface battlecode.common.RobotController
Returns all game objects of a given type nearby the robot
senseNearbyGameObjects(Class<T>, int, Team) - Method in interface battlecode.common.RobotController
Returns all game objects of a given type nearby the robot of a given team
senseNearbyGameObjects(Class<T>, MapLocation, int, Team) - Method in interface battlecode.common.RobotController
Senses all game objects of a given type within a given search area specified by the parameters
senseNonAlliedMineLocations(MapLocation, int) - Method in interface battlecode.common.RobotController
Similar to RobotController.senseMineLocations(MapLocation, int, Team) except the team is "non-allied" which includes both known enemy and neutral mines.
senseObjectAtLocation(MapLocation) - Method in interface battlecode.common.RobotController
Returns the object at the given location, or null if there is no object there.
senseRobotInfo(Robot) - Method in interface battlecode.common.RobotController
Sense the RobotInfo for the given robot.
senseTerrainTile(MapLocation) - Method in interface battlecode.common.RobotController
Senses the terrain at the given location.
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.
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".
SHIELD_CAP - Static variable in interface battlecode.common.GameConstants
Maximum amount of shields a single robot can carry
SHIELD_DECAY_RATE - Static variable in interface battlecode.common.GameConstants
Rate at which SHIELDS decay.
shields - Variable in class battlecode.common.RobotInfo
The shields of this Robot.
spawn(Direction) - Method in interface battlecode.common.RobotController
HQ ONLY.
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 applied to a team's HQ once the round limit is reached
toString() - Method in class battlecode.common.MapLocation
type - Variable in class battlecode.common.RobotInfo
The type of this Robot.

U

UNIT_ENERGON_UPKEEP - Static variable in interface battlecode.common.GameConstants
If a team cannot pay a unit's upkeep in power, it pays this cost in energon instead.
UNIT_POWER_UPKEEP - Static variable in interface battlecode.common.GameConstants
The upkeep cost of a unit per round.
Upgrade - Enum in battlecode.common
 

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.
valueOf(String) - Static method in enum battlecode.common.Upgrade
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.
values() - Static method in enum battlecode.common.Upgrade
Returns an array containing the constants of this enum type, in the order they are declared.
VISION_UPGRADE_BONUS - Static variable in interface battlecode.common.GameConstants
Extra sight radius bonus to unit vision when VISION is researched

W

wearHat() - Method in interface battlecode.common.RobotController
Puts a hat on the robot.

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.

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