Builder

class 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.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Sets the maximum time to wait for all bots to connect before a battle starts. Defaults to 30 seconds when not specified.

Link copied to clipboard

Use an embedded server, binding it to port (default 0 = dynamic port assignment). This is the default mode when no server configuration is supplied.

Link copied to clipboard

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.

Link copied to clipboard

Enable battle recording, writing a .battle.gz file to outputPath. Disabled by default.

Link copied to clipboard

Enable routing of embedded server and booter stdout through JUL at INFO level with [SERVER]/[BOOTER] prefixes. This is the default behaviour.

Link copied to clipboard

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.

Link copied to clipboard

Connect to a pre-started server at the given WebSocket url (e.g. ws://localhost:7654).

Link copied to clipboard

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.

Link copied to clipboard

Requires the connected server to advertise expected as its behavior compatibility version.

Link copied to clipboard

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.