Skip to contents

Owns a persistent Stockfish process for the session and keeps the eval bar, score, depth and principal variations in sync with the board position.

Usage

mod_board_server(id, chess_ctx, incoming = reactive(NULL))

Arguments

id

The module id.

chess_ctx

A chess.js V8 context from new_chess_context(), used to convert engine moves to SAN.

incoming

A reactive returning a position to load into the board - either a bare FEN string, or a list with fen, an optional orientation ("white"/"black") and an optional nonce to force a reload of an unchanged FEN - or NULL.

Value

Called for its side effects; wires up the board reactives.