Package dev.robocode.tankroyale.botapi
Class GameSetup
- Object
-
- GameSetup
-
public final class GameSetup extends ObjectGame setup retrieved when game is started.
-
-
Constructor Summary
Constructors Constructor Description GameSetup(String gameType, int arenaWidth, int arenaHeight, int numberOfRounds, double gunCoolingRate, int maxInactivityTurns, int turnTimeout, int readyTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetArenaHeight()Returns the height of the arena measured in units.intgetArenaWidth()Returns the width of the arena measured in units.StringgetGameType()Returns the game type, e.g.doublegetGunCoolingRate()Returns the gun cooling rate.intgetMaxInactivityTurns()Returns the Maximum number of inactive turns allowed, where a bot does not take any action before it is zapped by the game.intgetNumberOfRounds()Returns the number of rounds in a battle.intgetReadyTimeout()Returns the time limit in microseconds (µs) for sending ready message after having received 'new battle' message.intgetTurnTimeout()Returns the timeout in microseconds (µs) for sending intent after having received 'tick' message.
-
-
-
Method Detail
-
getGameType
public String getGameType()
Returns the game type, e.g. "melee".- Returns:
- The game type.
-
getArenaWidth
public int getArenaWidth()
Returns the width of the arena measured in units.- Returns:
- The width of the arena measured in units.
-
getArenaHeight
public int getArenaHeight()
Returns the height of the arena measured in units.- Returns:
- The height of the arena measured in units.
-
getNumberOfRounds
public int getNumberOfRounds()
Returns the number of rounds in a battle.- Returns:
- The number of rounds in a battle.
-
getGunCoolingRate
public double getGunCoolingRate()
Returns the gun cooling rate. The gun needs to cool down to a gun heat of zero before the gun is able to fire.- Returns:
- The gun cooling rate.
-
getMaxInactivityTurns
public int getMaxInactivityTurns()
Returns the Maximum number of inactive turns allowed, where a bot does not take any action before it is zapped by the game.- Returns:
- The Maximum number of inactive turns allowed.
-
getTurnTimeout
public int getTurnTimeout()
Returns the timeout in microseconds (µs) for sending intent after having received 'tick' message.- Returns:
- The turn timeout in microseconds (µs) (where 1 microsecond equals 1/1,000,000 of a second).
-
getReadyTimeout
public int getReadyTimeout()
Returns the time limit in microseconds (µs) for sending ready message after having received 'new battle' message.- Returns:
- The ready timeout in microseconds (µs) (where 1 microsecond equals 1/1,000,000 of a second).
-
-