public class BattleSpecification extends Object implements Serializable
RobocodeEngine
.Constructor and Description |
---|
BattleSpecification(BattlefieldSpecification battlefieldSize,
int numRounds,
long inactivityTime,
double gunCoolingRate,
int sentryBorderSize,
boolean hideEnemyNames,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given settings.
|
BattleSpecification(BattlefieldSpecification battlefieldSize,
int numRounds,
long inactivityTime,
double gunCoolingRate,
int sentryBorderSize,
boolean hideEnemyNames,
RobotSpecification[] robots,
RobotSetup[] initialSetups)
Creates a new BattleSpecification with the given settings.
|
BattleSpecification(int numRounds,
BattlefieldSpecification battlefieldSize,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given number of rounds, battlefield size, and robots.
|
BattleSpecification(int numRounds,
long inactivityTime,
double gunCoolingRate,
BattlefieldSpecification battlefieldSize,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given settings.
|
BattleSpecification(int numRounds,
long inactivityTime,
double gunCoolingRate,
boolean hideEnemyNames,
BattlefieldSpecification battlefieldSize,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given settings.
|
Modifier and Type | Method and Description |
---|---|
BattlefieldSpecification |
getBattlefield()
Returns the battlefield size for this battle.
|
double |
getGunCoolingRate()
Returns the gun cooling rate of the robots in this battle.
|
boolean |
getHideEnemyNames()
Returns the flag specifying if the enemy names must be hidden from events sent to robots.
|
long |
getInactivityTime()
Returns the allowed inactivity time for the robots in this battle.
|
RobotSetup[] |
getInitialSetups()
Returns the initial position and heading of each robot participating in this battle.
|
int |
getNumRounds()
Returns the number of rounds in this battle.
|
RobotSpecification[] |
getRobots()
Returns the specifications of the robots participating in this battle.
|
int |
getSentryBorderSize()
Returns the sentry border size for a
BorderSentry that defines the how
far a BorderSentry is allowed to move from the border edges measured in units. |
public BattleSpecification(int numRounds, BattlefieldSpecification battlefieldSize, RobotSpecification[] robots)
numRounds
- is the number of rounds in this battle.battlefieldSize
- is the battlefield size.robots
- is the robots participating in this battle.public BattleSpecification(int numRounds, long inactivityTime, double gunCoolingRate, BattlefieldSpecification battlefieldSize, RobotSpecification[] robots)
numRounds
- is the number of rounds in this battle.inactivityTime
- is the inactivity time allowed for the robots before they will loose energy.gunCoolingRate
- is the gun cooling rate for the robots.battlefieldSize
- is the battlefield size.robots
- is the robots participating in this battle.public BattleSpecification(int numRounds, long inactivityTime, double gunCoolingRate, boolean hideEnemyNames, BattlefieldSpecification battlefieldSize, RobotSpecification[] robots)
numRounds
- is the number of rounds in this battle.inactivityTime
- is the inactivity time allowed for the robots before they will loose energy.gunCoolingRate
- is the gun cooling rate for the robots.hideEnemyNames
- flag specifying if enemy names are hidden from robots.battlefieldSize
- is the battlefield size.robots
- is the robots participating in this battle.public BattleSpecification(BattlefieldSpecification battlefieldSize, int numRounds, long inactivityTime, double gunCoolingRate, int sentryBorderSize, boolean hideEnemyNames, RobotSpecification[] robots)
battlefieldSize
- is the battlefield size.numRounds
- is the number of rounds in this battle.inactivityTime
- is the inactivity time allowed for the robots before they will loose energy.gunCoolingRate
- is the gun cooling rate for the robots.sentryBorderSize
- is the sentry border size for a BorderSentry
.hideEnemyNames
- flag specifying if enemy names are hidden from robots.robots
- is the robots participating in this battle.public BattleSpecification(BattlefieldSpecification battlefieldSize, int numRounds, long inactivityTime, double gunCoolingRate, int sentryBorderSize, boolean hideEnemyNames, RobotSpecification[] robots, RobotSetup[] initialSetups)
battlefieldSize
- is the battlefield size.numRounds
- is the number of rounds in this battle.inactivityTime
- is the inactivity time allowed for the robots before they will loose energy.gunCoolingRate
- is the gun cooling rate for the robots.sentryBorderSize
- is the sentry border size for a BorderSentry
.hideEnemyNames
- flag specifying if enemy names are hidden from robots.robots
- is the robots participating in this battle.initialSetups
- is the initial position and heading of the robots, where the indices matches the indices from the robots
parameter.public long getInactivityTime()
public double getGunCoolingRate()
public BattlefieldSpecification getBattlefield()
public int getNumRounds()
public boolean getHideEnemyNames()
true
if the enemy names must be hidden; false
otherwise.public int getSentryBorderSize()
BorderSentry
that defines the how
far a BorderSentry is allowed to move from the border edges measured in units.public RobotSpecification[] getRobots()
RobotSpecification
instances - one entry for each robot.getInitialSetups()
public RobotSetup[] getInitialSetups()
RobotSetup
instances - one entry for each robot.
The the indices of this array matches the array indices from the robot specifications (see getRobots()
).getRobots()
Copyright © 2021 Robocode. All Rights Reserved.