Class GameConstants

java.lang.Object
battlecode.common.GameConstants

public class GameConstants extends Object
GameConstants defines constants that affect gameplay.
  • Field Details

    • SPEC_VERSION

      public static final String SPEC_VERSION
      The current spec version the server compiles with.
      See Also:
    • MAP_MIN_HEIGHT

      public static final int MAP_MIN_HEIGHT
      The minimum possible map height.
      See Also:
    • MAP_MAX_HEIGHT

      public static final int MAP_MAX_HEIGHT
      The maximum possible map height.
      See Also:
    • MAP_MIN_WIDTH

      public static final int MAP_MIN_WIDTH
      The minimum possible map width.
      See Also:
    • MAP_MAX_WIDTH

      public static final int MAP_MAX_WIDTH
      The maximum possible map width.
      See Also:
    • MIN_RUIN_SPACING_SQUARED

      public static final int MIN_RUIN_SPACING_SQUARED
      The minimum distance between ruins on the map
      See Also:
    • MAX_WALL_PERCENTAGE

      public static final int MAX_WALL_PERCENTAGE
      The maximum percentage of the map that can be walls
      See Also:
    • RESOURCE_PATTERN

      public static final int RESOURCE_PATTERN
      The 32 bit representation of the special resource pattern.
      See Also:
    • PAINT_TOWER_PATTERN

      public static final int PAINT_TOWER_PATTERN
      The 32 bit representation of the paint tower pattern.
      See Also:
    • MONEY_TOWER_PATTERN

      public static final int MONEY_TOWER_PATTERN
      The 32 bit representation of the money tower pattern.
      See Also:
    • DEFENSE_TOWER_PATTERN

      public static final int DEFENSE_TOWER_PATTERN
      The 32 bit representation of the defense tower pattern.
      See Also:
    • GAME_DEFAULT_SEED

      public static final int GAME_DEFAULT_SEED
      The default game seed.
      See Also:
    • GAME_MAX_NUMBER_OF_ROUNDS

      public static final int GAME_MAX_NUMBER_OF_ROUNDS
      The maximum number of rounds in a game.
      See Also:
    • ROBOT_BYTECODE_LIMIT

      public static final int ROBOT_BYTECODE_LIMIT
      The maximum number of bytecodes a robot is allowed to use in one turn
      See Also:
    • TOWER_BYTECODE_LIMIT

      public static final int TOWER_BYTECODE_LIMIT
      The maximum number of bytecodes a tower is allowed to use in one turn
      See Also:
    • INDICATOR_STRING_MAX_LENGTH

      public static final int INDICATOR_STRING_MAX_LENGTH
      The maximum length of indicator strings that a player can associate with a robot.
      See Also:
    • TIMELINE_LABEL_MAX_LENGTH

      public static final int TIMELINE_LABEL_MAX_LENGTH
      The maximum length of a label to add to the timeline.
      See Also:
    • EXCEPTION_BYTECODE_PENALTY

      public static final int EXCEPTION_BYTECODE_PENALTY
      The bytecode penalty that is imposed each time an exception is thrown.
      See Also:
    • PENALTY_ENEMY_TERRITORY

      public static final int PENALTY_ENEMY_TERRITORY
      Paint penalty for ending a turn on enemy territory
      See Also:
    • PENALTY_NEUTRAL_TERRITORY

      public static final int PENALTY_NEUTRAL_TERRITORY
      Paint penalty for ending a turn on neutral territory
      See Also:
    • INITIAL_TEAM_MONEY

      public static final int INITIAL_TEAM_MONEY
      The amount of money each team starts with.
      See Also:
    • PAINT_PERCENT_TO_WIN

      public static final int PAINT_PERCENT_TO_WIN
      The percent of the map which a team needs to paint to win.
      See Also:
    • MAX_NUMBER_OF_TOWERS

      public static final int MAX_NUMBER_OF_TOWERS
      The maximum number of towers that a team can have.
      See Also:
    • MAX_TEAM_EXECUTION_TIME

      public static final long MAX_TEAM_EXECUTION_TIME
      The maximum execution time that can be spent on a team in one match. If the total time spent executing a team's bots exceeds this limit, the team will immediately lose the game. Execution time is measured in ns.
      See Also:
    • NUMBER_INITIAL_TOWERS

      public static final int NUMBER_INITIAL_TOWERS
      The number of towers a player starts with.
      See Also:
    • NUMBER_INITIAL_PAINT_TOWERS

      public static final int NUMBER_INITIAL_PAINT_TOWERS
      The number of paint towers a player starts with
      See Also:
    • NUMBER_INITIAL_MONEY_TOWERS

      public static final int NUMBER_INITIAL_MONEY_TOWERS
      The number of money towers a player starts with
      See Also:
    • NUMBER_INITIAL_DEFENSE_TOWERS

      public static final int NUMBER_INITIAL_DEFENSE_TOWERS
      The number of defense towers a player starts with
      See Also:
    • INITIAL_ROBOT_PAINT_PERCENTAGE

      public static final int INITIAL_ROBOT_PAINT_PERCENTAGE
      The percentage of a robot's paint capacity that is full when first built.
      See Also:
    • INITIAL_TOWER_PAINT_AMOUNT

      public static final int INITIAL_TOWER_PAINT_AMOUNT
      How much paint that towers start with when first built
      See Also:
    • PATTERN_SIZE

      public static final int PATTERN_SIZE
      The width and height of the patterns that robots can draw
      See Also:
    • MARK_PATTERN_PAINT_COST

      public static final int MARK_PATTERN_PAINT_COST
      The paint cost of marking a resource or tower pattern
      See Also:
    • COMPLETE_RESOURCE_PATTERN_COST

      public static final int COMPLETE_RESOURCE_PATTERN_COST
      The money cost of completing a resource pattern
      See Also:
    • EXTRA_RESOURCES_FROM_PATTERN

      public static final int EXTRA_RESOURCES_FROM_PATTERN
      The extra resources per turn that resource patterns give
      See Also:
    • RESOURCE_PATTERN_ACTIVE_DELAY

      public static final int RESOURCE_PATTERN_ACTIVE_DELAY
      Resource patterns must exist for this many turns before they start producing resources
      See Also:
    • EXTRA_DAMAGE_FROM_DEFENSE_TOWER

      public static final int EXTRA_DAMAGE_FROM_DEFENSE_TOWER
      The extra damage all ally towers get for each level 1 defense tower
      See Also:
    • EXTRA_TOWER_DAMAGE_LEVEL_INCREASE

      public static final int EXTRA_TOWER_DAMAGE_LEVEL_INCREASE
      The increase in extra damage for ally towers for upgrading a defense tower
      See Also:
    • DEFENSE_ATTACK_BUFF_AOE_EFFECTIVENESS

      public static final int DEFENSE_ATTACK_BUFF_AOE_EFFECTIVENESS
      The percent of the defense tower damage buff that is applied to AoE attacks
      See Also:
    • MAX_TURNS_WITHOUT_PAINT

      public static final int MAX_TURNS_WITHOUT_PAINT
      DEPRECATED: See NO_PAINT_DAMAGE
      See Also:
    • INCREASED_COOLDOWN_THRESHOLD

      public static final int INCREASED_COOLDOWN_THRESHOLD
      Percent of paint capacity at which a robot begins to face increased cooldowns
      See Also:
    • INCREASED_COOLDOWN_INTERCEPT

      public static final int INCREASED_COOLDOWN_INTERCEPT
      Intercept in the formula for the increased cooldown
      See Also:
    • INCREASED_COOLDOWN_SLOPE

      public static final int INCREASED_COOLDOWN_SLOPE
      Slope of paint in the formula for the increased cooldown
      See Also:
    • MOPPER_PAINT_PENALTY_MULTIPLIER

      public static final int MOPPER_PAINT_PENALTY_MULTIPLIER
      Multiplier for paint penalties moppers face for ending on non-ally territory.
      See Also:
    • VISION_RADIUS_SQUARED

      public static final int VISION_RADIUS_SQUARED
      The maximum distance from a robot where information can be sensed
      See Also:
    • MARK_RADIUS_SQUARED

      public static final int MARK_RADIUS_SQUARED
      The maximum distance for marking a map location or removing a marker
      See Also:
    • PAINT_TRANSFER_RADIUS_SQUARED

      public static final int PAINT_TRANSFER_RADIUS_SQUARED
      The maximum distance for transferring paint from/to an ally robot or tower
      See Also:
    • BUILD_ROBOT_RADIUS_SQUARED

      public static final int BUILD_ROBOT_RADIUS_SQUARED
      The maximum distance from a tower for building robots
      See Also:
    • BUILD_TOWER_RADIUS_SQUARED

      public static final int BUILD_TOWER_RADIUS_SQUARED
      The maximum distance from a robot for building and upgrading towers
      See Also:
    • RESOURCE_PATTERN_RADIUS_SQUARED

      public static final int RESOURCE_PATTERN_RADIUS_SQUARED
      The maximum distance from a robot for completing special resource patterns
      See Also:
    • MOPPER_ATTACK_PAINT_DEPLETION

      public static final int MOPPER_ATTACK_PAINT_DEPLETION
      The amount of paint depleted from enemy in a regular mopper attack
      See Also:
    • MOPPER_ATTACK_PAINT_ADDITION

      public static final int MOPPER_ATTACK_PAINT_ADDITION
      The amount of paint added to self in a regular mopper attack
      See Also:
    • MOPPER_SWING_PAINT_DEPLETION

      public static final int MOPPER_SWING_PAINT_DEPLETION
      The amount of paint depleted from enemies in a swing mopper attack
      See Also:
    • MAX_MESSAGE_BYTES

      public static final int MAX_MESSAGE_BYTES
      The maximum amount of bytes that can be encoded in a message
      See Also:
    • MESSAGE_RADIUS_SQUARED

      public static final int MESSAGE_RADIUS_SQUARED
      The maximum squared radius a robot can send a message to
      See Also:
    • BROADCAST_RADIUS_SQUARED

      public static final int BROADCAST_RADIUS_SQUARED
      The maxmimum squared radius a tower can broadcast a message
      See Also:
    • MESSAGE_ROUND_DURATION

      public static final int MESSAGE_ROUND_DURATION
      The maximum number of rounds a message will exist for
      See Also:
    • MAX_MESSAGES_SENT_ROBOT

      public static final int MAX_MESSAGES_SENT_ROBOT
      The maximum number of messages a robot can send per turn
      See Also:
    • MAX_MESSAGES_SENT_TOWER

      public static final int MAX_MESSAGES_SENT_TOWER
      The maximum number of messages a tower can send per turn
      See Also:
    • NO_PAINT_DAMAGE

      public static final int NO_PAINT_DAMAGE
      A robot takes this much damage every time it ends a turn with 0 paint
      See Also:
    • SPLASHER_ATTACK_AOE_RADIUS_SQUARED

      public static final int SPLASHER_ATTACK_AOE_RADIUS_SQUARED
      The area effected by the splasher's attack. Within this radius, empty tiles are painted and towers are damaged
      See Also:
    • SPLASHER_ATTACK_ENEMY_PAINT_RADIUS_SQUARED

      public static final int SPLASHER_ATTACK_ENEMY_PAINT_RADIUS_SQUARED
      The smaller area within the splasher's attack at which enemy paint is also replaced by allied paint
      See Also:
    • COOLDOWN_LIMIT

      public static final int COOLDOWN_LIMIT
      If the amount of cooldown is at least this value, a robot cannot act.
      See Also:
    • COOLDOWNS_PER_TURN

      public static final int COOLDOWNS_PER_TURN
      The number of cooldown turns reduced per turn.
      See Also:
    • MOVEMENT_COOLDOWN

      public static final int MOVEMENT_COOLDOWN
      The amount added to the movement cooldown counter when moving
      See Also:
    • BUILD_ROBOT_COOLDOWN

      public static final int BUILD_ROBOT_COOLDOWN
      The amount added to the action cooldown counter after a tower builds a robot
      See Also:
    • ATTACK_MOPPER_SWING_COOLDOWN

      public static final int ATTACK_MOPPER_SWING_COOLDOWN
      The amount added to the action cooldown counter after attacking (as a mopper for the swing attack)
      See Also:
    • PAINT_TRANSFER_COOLDOWN

      public static final int PAINT_TRANSFER_COOLDOWN
      THe amount added to the action cooldown counter after transferring paint
      See Also:
  • Constructor Details

    • GameConstants

      public GameConstants()