|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrobocode.control.BattleSpecification
public class BattleSpecification
A BattleSpecification defines a battle configuration used by the RobocodeEngine.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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.initialSetup - is the initial position and heading of the robots, where the indices matches the indices from the robots parameter.| Method Detail |
|---|
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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||