robocode.control
Class BattleSpecification
- Serializable
public class BattleSpecification
A BattleSpecification defines the settings of a battle.
- Mathew A. Nelson (original)
- Flemming N. Larsen (contributor)
BattleSpecification
public BattleSpecification(int numRounds,
long inactivityTime,
double gunCoolingRate,
BattlefieldSpecification battlefieldSize,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given settings.
numRounds
- the number of rounds in this battleinactivityTime
- the inactivity time allowed for the robots before
they will loose energygunCoolingRate
- the gun cooling rate for the robotsbattlefieldSize
- the battlefield sizerobots
- the robots participating in this battle
BattleSpecification
public BattleSpecification(int numRounds,
BattlefieldSpecification battlefieldSize,
RobotSpecification[] robots)
Creates a new BattleSpecification with the given number of rounds,
battlefield size, and robots. Inactivity time for the robots defaults to
450, and the gun cooling rate defaults to 0.1.
numRounds
- the number of rounds in this battlebattlefieldSize
- the battlefield sizerobots
- the robots participating in this battle
BattleProperties getBattleProperties
public @Deprecated BattleProperties getBattleProperties()
This methods is called by the game and is very likely to be
removed in a future version of Robocode.
Do not call this method!
- the properties of this battle.
getBattlefield
public BattlefieldSpecification getBattlefield()
Returns the battlefield size for this battle.
- the battlefield size for this battle.
getGunCoolingRate
public double getGunCoolingRate()
Returns the gun cooling rate of the robots in this battle.
- the gun cooling rate of the robots in this battle.
getInactivityTime
public long getInactivityTime()
Returns the allowed inactivity time for the robots in this battle.
- the allowed inactivity time for the robots in this battle.
getNumRounds
public int getNumRounds()
Returns the number of rounds in this battle.
- the number of rounds in this battle.
getRobots
public RobotSpecification[] getRobots()
Returns the robots participating in this battle.
- the robots participating in this battle.