Package battlecode.common
Interface RobotController
public interface RobotController
A RobotController allows contestants to make their robot sense and interact
with the game world. When a contestant's
RobotPlayer is
constructed, it is passed an instance of RobotController that
controls the newly created robot.-
Method Summary
Modifier and TypeMethodDescriptionReturns the location adjacent to current location in the given direction.voidattack(MapLocation loc) Performs the specific attack for this robot type, defaulting to the primary colorvoidattack(MapLocation loc, boolean useSecondaryColor) Performs the specific attack for this robot type.voidbroadcastMessage(int messageContent) Broadcasts a message to all friendly towers within the broadcasting radius.voidbuildRobot(UnitType type, MapLocation loc) Spawns a robot at the given location.booleancanAttack(MapLocation loc) Tests whether this robot can attack the given location.booleanReturns true if this tower can broadcast a message.booleancanBuildRobot(UnitType type, MapLocation loc) Checks if a tower can spawn a robot at the given location.booleanChecks if the robot can complete a 5x5 special resource pattern centered at the given location.booleancanCompleteTowerPattern(UnitType type, MapLocation loc) Checks if the robot can build a tower at the given location.booleancanMark(MapLocation loc) Checks if the location can be marked.booleanChecks if the robot can mark a 5x5 special resource pattern centered at the given location.booleancanMarkTowerPattern(UnitType type, MapLocation loc) Checks if the robot can build a tower by marking a 5x5 pattern centered at the given location.booleancanMopSwing(Direction dir) Tests whether this robot (which must be a mopper) can perform a mop swing in a specific directionbooleanChecks whether this robot can move one step in the given direction.booleancanPaint(MapLocation loc) Tests whether this robot can paint the given location.booleancanRemoveMark(MapLocation loc) Checks if a mark at the location can be removed.booleanReturns true if the unit can send a message to a specific location, false otherwise.booleancanSendMessage(MapLocation loc, int messageContent) Returns true if the unit can send a message to a specific location, false otherwise.booleanChecks whether the given location is within the robot's vision range, and if it is on the map.booleancanSenseRobot(int id) Tests whether the given robot exists and if it is within this robot's vision range.booleanChecks whether a robot is at a given location.booleancanTransferPaint(MapLocation loc, int amount) Tests whether you can transfer paint to a given robot/tower.booleanChecks if a tower can be upgraded by verifying conditions on the location, team, tower level, and cost.voidCompletes a 5x5 special resource pattern centered at the given location.voidcompleteTowerPattern(UnitType type, MapLocation loc) Builds a tower at the given location.voidDestroys the robot.intReturns the number of action cooldown turns remaining before this unit can act again.getAllLocationsWithinRadiusSquared(MapLocation center, int radiusSquared) Returns a list of all locations within the given radiusSquared of a location.intgetChips()Alias for getMoneyintReturns this robot's current health.intgetID()Returns the ID of this robot.Returns this robot's current location.intReturns the height of the game map.intReturns the width of the game map.intgetMoney()Returns the amount of money that this robot's team has.intReturns the number of movement cooldown turns remaining before this unit can move again.intReturns how many allied towers are currently alive.intgetPaint()Returns this robot's current paint amount.boolean[][]Returns the 5x5 resource pattern.intReturns the current round number, where round 1 is the first round of the match.getTeam()Returns this robot's Team.boolean[][]getTowerPattern(UnitType type) Returns the 5x5 pattern needed to be drawn to build a tower of the specified type.getType()Returns what UnitType this robot is.booleanTests whether the robot can act.booleanChecks whether a robot is at a given location.booleanTests whether the robot can move.voidmark(MapLocation loc, boolean secondary) Adds a mark at the given location.voidMarks a 5x5 special resource pattern centered at the given location.voidmarkTowerPattern(UnitType type, MapLocation loc) Builds a tower by marking a 5x5 pattern centered at the given location.voidPerforms a mop swing in the given direction (only for moppers!)voidMoves one step in the given direction.booleanonTheMap(MapLocation loc) Checks whether a MapLocation is on the map.Message[]readMessages(int roundNum) Reads all messages sent to this unit within the past 5 rounds if roundNum = -1, or only messages sent from the specified round otherwisevoidremoveMark(MapLocation loc) Removes the mark at the given location.voidresign()Causes your team to lose the game.voidsendMessage(MapLocation loc, int messageContent) Sends a message (contained in an int, so 4 bytes) to a specific unit at a location on the map, if it is possiblesenseMapInfo(MapLocation loc) Senses the map info at a location.MapInfo[]Return map info for all senseable locations.MapInfo[]senseNearbyMapInfos(int radiusSquared) Return map info for all senseable locations within a radius squared.MapInfo[]senseNearbyMapInfos(MapLocation center) Return map info for all senseable locations within vision radius of a center location.MapInfo[]senseNearbyMapInfos(MapLocation center, int radiusSquared) Return map info for all senseable locations within a radius squared of a center location.Returns all robots within vision radius.senseNearbyRobots(int radiusSquared) Returns all robots that can be sensed within a certain distance of this robot.senseNearbyRobots(int radiusSquared, Team team) Returns all robots of a given team that can be sensed within a certain distance of this robot.senseNearbyRobots(MapLocation center, int radiusSquared, Team team) Returns all robots of a given team that can be sensed within a certain radius of a specified location.senseNearbyRuins(int radiusSquared) Returns the location of all nearby ruins that are visible to the robot.booleanGiven a senseable location, returns whether that location is passable (a wall).senseRobot(int id) Senses information about a particular robot given its ID.Senses the robot at the given location, or null if there is no robot there.voidsetIndicatorDot(MapLocation loc, int red, int green, int blue) Draw a dot on the game map for debugging purposes.voidsetIndicatorLine(MapLocation startLoc, MapLocation endLoc, int red, int green, int blue) Draw a line on the game map for debugging purposes.voidsetIndicatorString(String string) Sets the indicator string for this robot for debugging purposes.voidsetTimelineMarker(String label, int red, int green, int blue) Adds a marker to the timeline at the current round for debugging purposes.voidtransferPaint(MapLocation loc, int amount) Transfers paint from the robot's stash to the stash of the allied robot or tower at loc.voidupgradeTower(MapLocation loc) Upgrades a tower if possible; subtracts the corresponding amount of money from the team.
-
Method Details
-
getRoundNum
int getRoundNum()Returns the current round number, where round 1 is the first round of the match.- Returns:
- the current round number, where round 1 is the first round of the match
- Bytecode cost:
1
-
getMapWidth
int getMapWidth()Returns the width of the game map. Valid x coordinates range from 0 (inclusive) to the width (exclusive).- Returns:
- the map width
- Bytecode cost:
1
-
getMapHeight
int getMapHeight()Returns the height of the game map. Valid y coordinates range from 0 (inclusive) to the height (exclusive).- Returns:
- the map height
- Bytecode cost:
1
-
getResourcePattern
boolean[][] getResourcePattern()Returns the 5x5 resource pattern.- Returns:
- a boolean array of arrays, where entry [i][j] is true if the i'th row and j'th column of the pattern should use the secondary color
- Bytecode cost:
2
-
getTowerPattern
Returns the 5x5 pattern needed to be drawn to build a tower of the specified type.- Parameters:
type- the type of tower to build. Must be a tower type.- Returns:
- a boolean array of arrays, where entry [i][j] is true if the i'th row and j'th column of the pattern should use the secondary color
- Throws:
GameActionException- Bytecode cost:
2
-
getID
int getID()Returns the ID of this robot.- Returns:
- the ID of this robot
- Bytecode cost:
1
-
getTeam
Team getTeam()Returns this robot's Team.- Returns:
- this robot's Team
- Bytecode cost:
1
-
getLocation
MapLocation getLocation()Returns this robot's current location.- Returns:
- this robot's current location
- Bytecode cost:
1
-
getHealth
int getHealth()Returns this robot's current health.- Returns:
- this robot's current health
- Bytecode cost:
1
-
getPaint
int getPaint()Returns this robot's current paint amount.- Returns:
- this robot's current paint amount
- Bytecode cost:
1
-
getMoney
int getMoney()Returns the amount of money that this robot's team has.- Returns:
- the amount of money this robot's team has
- Bytecode cost:
1
-
getChips
int getChips()Alias for getMoney- Returns:
- the amount of money this robot's team has
- Bytecode cost:
1
-
getType
UnitType getType()Returns what UnitType this robot is.- Returns:
- the UnitType of this robot
- Bytecode cost:
1
-
getNumberTowers
int getNumberTowers()Returns how many allied towers are currently alive.- Returns:
- the number of alive allied towers.
- Bytecode cost:
5
-
onTheMap
Checks whether a MapLocation is on the map.- Parameters:
loc- the location to check- Returns:
- true if the location is on the map; false otherwise
- Bytecode cost:
5
-
canSenseLocation
Checks whether the given location is within the robot's vision range, and if it is on the map.- Parameters:
loc- the location to check- Returns:
- true if the given location is within the robot's vision range and is on the map; false otherwise
- Bytecode cost:
5
-
isLocationOccupied
Checks whether a robot is at a given location. Assumes the location is valid.- Parameters:
loc- the location to check- Returns:
- true if a robot is at the location
- Throws:
GameActionException- if the location is not within vision range or on the map- Bytecode cost:
5
-
canSenseRobotAtLocation
Checks whether a robot is at a given location. Assume the location is valid.- Parameters:
loc- the location to check- Returns:
- true if a robot is at the location, false if there is no robot or the location can not be sensed
- Bytecode cost:
5
-
senseRobotAtLocation
Senses the robot at the given location, or null if there is no robot there.- Parameters:
loc- the location to check- Returns:
- the robot at the given location
- Throws:
GameActionException- if the location is not within vision range- Bytecode cost:
15
-
canSenseRobot
boolean canSenseRobot(int id) Tests whether the given robot exists and if it is within this robot's vision range.- Parameters:
id- the ID of the robot to query- Returns:
- true if the given robot is within this robot's vision range and exists; false otherwise
- Bytecode cost:
5
-
senseRobot
Senses information about a particular robot given its ID.- Parameters:
id- the ID of the robot to query- Returns:
- a RobotInfo object for the sensed robot
- Throws:
GameActionException- if the robot cannot be sensed (for example, if it doesn't exist or is out of vision range)- Bytecode cost:
25
-
senseNearbyRobots
RobotInfo[] senseNearbyRobots()Returns all robots within vision radius. The objects are returned in no particular order.- Returns:
- array of RobotInfo objects, which contain information about all the robots you saw
- Bytecode cost:
100
-
senseNearbyRobots
Returns all robots that can be sensed within a certain distance of this robot. The objects are returned in no particular order.- Parameters:
radiusSquared- return robots this distance away from the center of this robot; if -1 is passed, all robots within vision radius are returned; if radiusSquared is larger than the robot's vision radius, the vision radius is used- Returns:
- array of RobotInfo objects of all the robots you saw
- Throws:
GameActionException- if the radius is negative (and not -1)- Bytecode cost:
100
-
senseNearbyRobots
Returns all robots of a given team that can be sensed within a certain distance of this robot. The objects are returned in no particular order.- Parameters:
radiusSquared- return robots this distance away from the center of this robot; if -1 is passed, all robots within vision radius are returned; if radiusSquared is larger than the robot's vision radius, the vision radius is usedteam- filter game objects by the given team; if null is passed, robots from any team are returned- Returns:
- array of RobotInfo objects of all the robots you saw
- Throws:
GameActionException- if the radius is negative (and not -1)- Bytecode cost:
100
-
senseNearbyRobots
RobotInfo[] senseNearbyRobots(MapLocation center, int radiusSquared, Team team) throws GameActionException Returns all robots of a given team that can be sensed within a certain radius of a specified location. The objects are returned in no particular order.- Parameters:
center- center of the given search radiusradiusSquared- return robots this distance away from the center of this robot; if -1 is passed, all robots within vision radius are returned; if radiusSquared is larger than the robot's vision radius, the vision radius is usedteam- filter game objects by the given team; if null is passed, objects from all teams are returned- Returns:
- array of RobotInfo objects of the robots you saw
- Throws:
GameActionException- if the radius is negative (and not -1) or the center given is null- Bytecode cost:
100
-
sensePassability
Given a senseable location, returns whether that location is passable (a wall).- Parameters:
loc- the given location- Returns:
- whether that location is passable
- Throws:
GameActionException- if the robot cannot sense the given location- Bytecode cost:
5
-
senseMapInfo
Senses the map info at a location. MapInfo includes walls, paint, marks, and ruins- Parameters:
loc- to sense map at- Returns:
- MapInfo describing map at location
- Throws:
GameActionException- if location can not be sensed- Bytecode cost:
5
-
senseNearbyMapInfos
MapInfo[] senseNearbyMapInfos()Return map info for all senseable locations. MapInfo includes walls, paint, marks, and ruins.- Returns:
- MapInfo about all locations within vision radius
- Bytecode cost:
100
-
senseNearbyMapInfos
Return map info for all senseable locations within a radius squared. If radiusSquared is larger than the robot's vision radius, uses the robot's vision radius instead. If -1 is passed, all locations within vision radius are returned. MapInfo includes walls, paint, marks, and ruins.- Parameters:
radiusSquared- the squared radius of all locations to be returned- Returns:
- MapInfo about all locations within vision radius
- Throws:
GameActionException- if the radius is negative (and not -1)- Bytecode cost:
100
-
senseNearbyMapInfos
Return map info for all senseable locations within vision radius of a center location. MapInfo includes walls, paint, marks, and ruins- Parameters:
center- the center of the search area- Returns:
- MapInfo about all locations within vision radius
- Throws:
GameActionException- if center is null- Bytecode cost:
100
-
senseNearbyMapInfos
Return map info for all senseable locations within a radius squared of a center location. If radiusSquared is larger than the robot's vision radius, uses the robot's vision radius instead. If -1 is passed, all locations within vision radius are returned. MapInfo includes walls, paint, marks, and ruins- Parameters:
center- the center of the search arearadiusSquared- the squared radius of all locations to be returned- Returns:
- MapInfo about all locations within vision radius
- Throws:
GameActionException- if the radius is negative (and not -1)- Bytecode cost:
100
-
senseNearbyRuins
Returns the location of all nearby ruins that are visible to the robot. If radiusSquared is greater than the robot's vision radius, uses the robot's vision radius instead.- Parameters:
radiusSquared- squared radius of all locations to be returned, -1 for max radius- Returns:
- all locations containing ruins
- Throws:
GameActionException- if a radius less than -1 is provided- Bytecode cost:
100
-
adjacentLocation
Returns the location adjacent to current location in the given direction.- Parameters:
dir- the given direction- Returns:
- the location adjacent to current location in the given direction
- Bytecode cost:
1
-
getAllLocationsWithinRadiusSquared
MapLocation[] getAllLocationsWithinRadiusSquared(MapLocation center, int radiusSquared) throws GameActionException Returns a list of all locations within the given radiusSquared of a location. If radiusSquared is larger than the robot's vision radius, uses the robot's vision radius instead. Checks that radiusSquared is non-negative.- Parameters:
center- the given locationradiusSquared- return locations within this distance away from center- Returns:
- list of locations on the map and within radiusSquared of center
- Throws:
GameActionException- if the radius is negative (and not -1)- Bytecode cost:
100
-
isActionReady
boolean isActionReady()Tests whether the robot can act.- Returns:
- true if the robot can act
- Bytecode cost:
1
-
getActionCooldownTurns
int getActionCooldownTurns()Returns the number of action cooldown turns remaining before this unit can act again. When this number is strictly less thanGameConstants.COOLDOWN_LIMIT, isActionReady() is true and the robot can act again. This number decreases byGameConstants.COOLDOWNS_PER_TURNevery turn.- Returns:
- the number of action turns remaining before this unit can act again
- Bytecode cost:
1
-
isMovementReady
boolean isMovementReady()Tests whether the robot can move.- Returns:
- true if the robot can move
- Bytecode cost:
1
-
getMovementCooldownTurns
int getMovementCooldownTurns()Returns the number of movement cooldown turns remaining before this unit can move again. When this number is strictly less thanGameConstants.COOLDOWN_LIMIT, isMovementReady() is true and the robot can move again. This number decreases byGameConstants.COOLDOWNS_PER_TURNevery turn.- Returns:
- the number of cooldown turns remaining before this unit can move again
- Bytecode cost:
1
-
canMove
Checks whether this robot can move one step in the given direction. Returns false if the robot is not in a mode that can move, if the target location is not on the map, if the target location is occupied, if the target location is impassible, or if there are cooldown turns remaining.- Parameters:
dir- the direction to move in- Returns:
- true if it is possible to call
movewithout an exception - Bytecode cost:
10
-
move
Moves one step in the given direction.- Parameters:
dir- the direction to move in- Throws:
GameActionException- if the robot cannot move one step in this direction, such as cooldown being too high, the target location being off the map, or the target destination being occupied by another robot, or the target destination being impassible.- Bytecode cost:
0
-
canBuildRobot
Checks if a tower can spawn a robot at the given location. Robots can spawn within a circle of radius of sqrt(4) of the tower.- Parameters:
type- the type of robot to spawnloc- the location to spawn the robot at- Returns:
- true if robot can be built at loc
- Bytecode cost:
10
-
buildRobot
Spawns a robot at the given location. Robots can spawn within a circle of radius of sqrt(4) of the tower.- Parameters:
type- the type of robot to spawnloc- the location to spawn the robot at- Throws:
GameActionException- Bytecode cost:
20
-
canMark
Checks if the location can be marked.- Parameters:
loc- the location to mark- Bytecode cost:
5
-
mark
Adds a mark at the given location.- Parameters:
loc- the location to marksecondary- whether the secondary color should be used- Throws:
GameActionException- Bytecode cost:
5
-
canRemoveMark
Checks if a mark at the location can be removed.- Parameters:
loc- the location that has the mark- Bytecode cost:
5
-
removeMark
Removes the mark at the given location.- Parameters:
loc- the location that has the mark- Throws:
GameActionException- Bytecode cost:
5
-
canMarkTowerPattern
Checks if the robot can build a tower by marking a 5x5 pattern centered at the given location. This requires there to be a ruin at the location.- Parameters:
type- which tower pattern type should be usedloc- the center of the 5x5 pattern- Returns:
- true if a tower pattern can be marked at loc
- Bytecode cost:
50
-
markTowerPattern
Builds a tower by marking a 5x5 pattern centered at the given location. This requires there to be a ruin at the location.- Parameters:
type- the type of tower to mark the pattern forloc- the center of the 5x5 pattern- Throws:
GameActionException- Bytecode cost:
50
-
canUpgradeTower
Checks if a tower can be upgraded by verifying conditions on the location, team, tower level, and cost.- Parameters:
loc- the location to upgrade the tower at- Bytecode cost:
2
-
upgradeTower
Upgrades a tower if possible; subtracts the corresponding amount of money from the team.- Parameters:
loc- the location to upgrade the tower at- Throws:
GameActionException- Bytecode cost:
0
-
canMarkResourcePattern
Checks if the robot can mark a 5x5 special resource pattern centered at the given location.- Parameters:
loc- the center of the resource pattern- Returns:
- true if an SRP can be marked at loc
- Bytecode cost:
50
-
markResourcePattern
Marks a 5x5 special resource pattern centered at the given location.- Parameters:
loc- the center of the resource pattern- Throws:
GameActionException- Bytecode cost:
50
-
canCompleteTowerPattern
Checks if the robot can build a tower at the given location. This requires there to be a ruin at the location. This also requires the 5x5 region to be painted correctly.- Parameters:
type- the type of tower to buildloc- the location to build at- Returns:
- true if tower can be built at loc
- Bytecode cost:
50
-
completeTowerPattern
Builds a tower at the given location. This requires there to be a ruin at the location. This also requires the 5x5 region to be painted correctly.- Parameters:
type- the type of tower to buildloc- the location to build at- Throws:
GameActionException- Bytecode cost:
50
-
canCompleteResourcePattern
Checks if the robot can complete a 5x5 special resource pattern centered at the given location. This requires the 5x5 region to be painted correctly.- Parameters:
loc- the center of the resource pattern- Returns:
- true if the SRP can be completed at loc
- Bytecode cost:
50
-
completeResourcePattern
Completes a 5x5 special resource pattern centered at the given location. This requires the 5x5 region to be painted correctly.- Parameters:
loc- the center of the resource pattern- Throws:
GameActionException- Bytecode cost:
50
-
canPaint
Tests whether this robot can paint the given location.- Parameters:
loc- target location to paint- Returns:
- true if rc.attack(loc) will paint the given location
- Bytecode cost:
10
-
canAttack
Tests whether this robot can attack the given location. Types of attacks for specific units determine whether or not towers, other robots, or empty tiles can be attacked.- Parameters:
loc- target location to attack- Returns:
- whether it is possible to attack the given location
- Bytecode cost:
10
-
attack
Performs the specific attack for this robot type.- Parameters:
loc- the target location to attack (for splashers, the center location) Note: for a tower, leaving loc null represents an area attackuseSecondaryColor- whether or not the attack should use a secondary color- Throws:
GameActionException- if conditions for attacking are not satisfied- Bytecode cost:
0
-
attack
Performs the specific attack for this robot type, defaulting to the primary color- Parameters:
loc- the target location to attack (for splashers, the center location) Note: for a tower, leaving loc null represents an area attack- Throws:
GameActionException- if conditions for attacking are not satisfied- Bytecode cost:
0
-
canMopSwing
Tests whether this robot (which must be a mopper) can perform a mop swing in a specific direction- Parameters:
dir- the direction in which to mop swing- Returns:
- whether it is possible to mop swing in the given direction
- Bytecode cost:
10
-
mopSwing
Performs a mop swing in the given direction (only for moppers!)- Parameters:
dir- the direction in which to mop swing- Throws:
GameActionException- if conditions for attacking are not satisfied- Bytecode cost:
0
-
canSendMessage
Returns true if the unit can send a message to a specific location, false otherwise. We can send a message to a location if it is within a specific distance and connected by paint, and only if one unit is a robot and the other is a tower.- Parameters:
loc- the location to send the message to- Bytecode cost:
50
-
canSendMessage
Returns true if the unit can send a message to a specific location, false otherwise. We can send a message to a location if it is within a specific distance and connected by paint, and only if one unit is a robot and the other is a tower.- Parameters:
loc- the location to send the message tomessageContent- the contents of the message. Does not affect whether or not the message can be sent.- Bytecode cost:
50
-
sendMessage
Sends a message (contained in an int, so 4 bytes) to a specific unit at a location on the map, if it is possible- Parameters:
loc- the location to send the message tomessageContent- an int representing the content of the message (up to 4 bytes)- Throws:
GameActionException- if conditions for messaging are not satisfied- Bytecode cost:
50
-
canBroadcastMessage
boolean canBroadcastMessage()Returns true if this tower can broadcast a message. You can broadcast a message if this robot is a tower and the tower has not yet sent the maximum number of messages this round (broadcasting a message to other towers counts as one message sent, even if multiple towers receive the message).- Returns:
- Whether this robot can broadcast a message
-
broadcastMessage
Broadcasts a message to all friendly towers within the broadcasting radius. This works the same as sendMessage, but it can only be performed by towers and sends the message to all friendly towers within range simultaneously. The towers need not be connected by paint to receive the message.- Parameters:
messageContent- The message to broadcast.- Throws:
GameActionException- If the message can't be sent
-
readMessages
Reads all messages sent to this unit within the past 5 rounds if roundNum = -1, or only messages sent from the specified round otherwise- Parameters:
roundNum- the round number to read messages from, or -1 to read all messages in the queue- Returns:
- All messages of the specified round, or all messages from the past 5 round.
- Bytecode cost:
10
-
canTransferPaint
Tests whether you can transfer paint to a given robot/tower. You can give paint to an allied robot/tower if you are a mopper and can act at the given location. You can take paint from allied towers regardless of type, if you can act at the location. Pass in a negative number to take paint.- Parameters:
loc- the location of the robot/tower to transfer paint toamount- the amount of paint to transfer. Positive to give paint, negative to take paint.- Returns:
- true if the robot can transfer paint to a robot/tower at the given location
-
transferPaint
Transfers paint from the robot's stash to the stash of the allied robot or tower at loc. Pass in a negative number to take paint, positive to give paint.- Parameters:
loc- the location of the robot/tower to transfer paint toamount- the amount of paint to transfer. Positive to give paint, negative to take paint.- Throws:
GameActionException- if the robot is not able to transfer paint to the location
-
disintegrate
void disintegrate()Destroys the robot.- Bytecode cost:
0
-
resign
void resign()Causes your team to lose the game. It's like typing "gg."- Bytecode cost:
0
-
setIndicatorString
Sets the indicator string for this robot for debugging purposes. Only the firstGameConstants.INDICATOR_STRING_MAX_LENGTHcharacters are used.- Parameters:
string- the indicator string this round- Bytecode cost:
0
-
setIndicatorDot
Draw a dot on the game map for debugging purposes.- Parameters:
loc- the location to draw the dotred- the red component of the dot's colorgreen- the green component of the dot's colorblue- the blue component of the dot's color- Throws:
GameActionException- if the location is off the map- Bytecode cost:
0
-
setIndicatorLine
void setIndicatorLine(MapLocation startLoc, MapLocation endLoc, int red, int green, int blue) throws GameActionException Draw a line on the game map for debugging purposes.- Parameters:
startLoc- the location to draw the line fromendLoc- the location to draw the line tored- the red component of the line's colorgreen- the green component of the line's colorblue- the blue component of the line's color- Throws:
GameActionException- if any location is off the map- Bytecode cost:
0
-
setTimelineMarker
Adds a marker to the timeline at the current round for debugging purposes. Only the firstGameConstants.TIMELINE_LABEL_MAX_LENGTHcharacters are used.- Parameters:
label- the label for the timeline markerred- the red component of the marker's colorgreen- the green component of the marker's colorblue- the blue component of the marker's color- Bytecode cost:
0
-