public final class BattleRules extends Object implements Serializable
BattleStartedEvent.getBattleRules()
when a battle is started and
BattleCompletedEvent.getBattleRules()
when a battle is completed.BattleStartedEvent
,
BattleCompletedEvent
,
Serialized FormModifier and Type | Method and Description |
---|---|
int |
getBattlefieldHeight()
Returns the battlefield height.
|
int |
getBattlefieldWidth()
Returns the battlefield width.
|
double |
getGunCoolingRate()
Returns the rate at which the gun will cool down, i.e.
|
boolean |
getHideEnemyNames()
Returns true if the enemy names are hidden, i.e.
|
long |
getInactivityTime()
Returns the allowed inactivity time, where the robot is not taking any action, before will begin to be zapped.
|
int |
getNumRounds()
Returns the number of rounds.
|
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.Hence, the sentry border size defines the width/range of the border area surrounding the battlefield that BorderSentrys cannot leave (sentry robots robots must stay in the border area), but it also define the distance from the border edges where BorderSentrys are allowed/able to make damage to robots entering this border area. |
public int getBattlefieldWidth()
public int getBattlefieldHeight()
public int getNumRounds()
public double getGunCoolingRate()
Robot.getGunHeat()
,
Robot.fire(double)
,
Robot.fireBullet(double)
public long getInactivityTime()
Robot.doNothing()
,
AdvancedRobot.execute()
public boolean getHideEnemyNames()
public int getSentryBorderSize()
BorderSentry
that defines the how
far a BorderSentry is allowed to move from the border edges measured in units.Copyright © 2014. All rights reserved.