BarClient Type
High-level client for orchestrating a BAR AI game session. Manages the full lifecycle: engine launch, proxy connection, handshake, frame stepping, and cleanup.
Constructors
| Constructor |
Description
|
|
Creates a new BarClient with the given engine configuration.
|
Instance members
| Instance member |
Description
|
|
Gets the engine configuration used to create this client.
|
|
Game frames as a push-based observable. Subscribers receive frames as they arrive from the engine. The observable completes when the engine disconnects or sends a shutdown message.
|
|
Gets the current game state snapshot, updated each frame.
|
|
Gets the handshake information received from the proxy, or None if not yet connected.
|
Full Usage:
this.Reset
|
Resets the in-game state by sending cheat commands. |
|
Queue commands to send with the next frame response.
|
Full Usage:
this.Start
|
Launches the BAR engine, connects to the proxy, and performs the handshake. |
|
Gets the current lifecycle state of this session.
|
Full Usage:
this.Stop
|
Stops the session and cleans up all resources. Safe to call from any state. |
|
Gets the active network stream to the HighBar V2 proxy.
|
|
Blocks and collects up to N frames from the observable, calling the handler for each. Useful for synchronous REPL-style stepping.
|
FSBarV1_Archived