Battle Setup
data class BattleSetup(val gameType: GameType, val arenaWidth: Int, val arenaHeight: Int, val minNumberOfParticipants: Int, val maxNumberOfParticipants: Int?, val numberOfRounds: Int, val gunCoolingRate: Double, val maxInactivityTurns: Int, val turnTimeoutMicros: Int, val readyTimeoutMicros: Int, val defaultTurnsPerSecond: Int = -1)
Immutable battle configuration derived from a game type preset with optional parameter overrides.
Kotlin:
val setup = BattleSetup.classic()
val setup = BattleSetup.classic { numberOfRounds = 5 }
val setup = BattleSetup.melee { numberOfRounds = 3 }
val setup = BattleSetup.twinDuel()
val setup = BattleSetup.custom { arenaWidth = 1200; arenaHeight = 900 }Content copied to clipboard
Java:
var setup = BattleSetup.classic();
var setup = BattleSetup.classic(s -> s.setNumberOfRounds(5));
var setup = BattleSetup.melee(s -> s.setNumberOfRounds(3));
var setup = BattleSetup.twinDuel();
var setup = BattleSetup.custom(s -> { s.setArenaWidth(1200); s.setArenaHeight(900); });Content copied to clipboard
Types
Link copied to clipboard
class Builder
Builder for creating a BattleSetup from a preset with optional field overrides. All fields are pre-populated with preset defaults and may be freely overridden.
Properties
Link copied to clipboard
arena height in pixels
Link copied to clipboard
arena width in pixels
Link copied to clipboard
default TPS for the battle; -1 means max speed (default)
Link copied to clipboard
rate at which gun heat decreases per turn
Link copied to clipboard
maximum consecutive turns allowed without bot activity
Link copied to clipboard
maximum number of bots allowed, or null for no upper limit
Link copied to clipboard
minimum number of bots required to start the battle
Link copied to clipboard
number of rounds to play
Link copied to clipboard
deadline for bots to signal ready at round start, in microseconds
Link copied to clipboard
per-turn deadline for bots to submit their intent, in microseconds