Builder
DSL builder for configuring a BattleRunner.
Defaults to embedded-server mode on a dynamically assigned port. Builder methods return this for fluent chaining from Java.
Functions
Sets the maximum time to wait for all bots to connect before a battle starts. Defaults to 30 seconds when not specified.
Use an embedded server, binding it to port (default 0 = dynamic port assignment). This is the default mode when no server configuration is supplied.
Enable intent diagnostics via a transparent WebSocket proxy (Decision 8). When enabled, bot intents are captured per-bot per-turn in memory. Disabled by default to avoid the extra network hop.
Enable battle recording, writing a .battle.gz file to outputPath. Disabled by default.
Enable routing of embedded server and booter stdout through JUL at INFO level with [SERVER]/[BOOTER] prefixes. This is the default behaviour.
Enables timing traces for server tick dispatch, intent arrival, and skipped-turn detection and delivery. Sets the embedded server to tps and passes a timing flag to launched bots. Requires an embedded server and is disabled by default.
Connect to a pre-started server at the given WebSocket url (e.g. ws://localhost:7654).
Sets a listener that is called while each battle starts, with how many of the expected bots have connected, how many are missing, how long the runner has waited and its connect limit: on every change of the connected bots and about every half second while it waits. The last call shows every expected bot connected. This is the same progress as BattleHandle.onBootProgress, which a caller of runBattle cannot reach because the handle exists only after the bots have connected. A listener that throws does not stop the battle.
Requires the connected server to advertise expected as its behavior compatibility version.
Suppress routing of embedded server and booter stdout through JUL. By default, stdout from both processes is logged at INFO level with [SERVER]/[BOOTER] prefixes. Call this when you configure your own logging and do not want that noise.