/** * Lightweight Go board for KataGo ONNX input encoding. * * Tracks stone placement and history (up to 8 moves back) needed to * construct KataGo's binary spatial feature planes. */ export type Color = 0 | 1 | 2; export interface Stone { row: number; col: number; } export declare class KataGoBoard { readonly size: number; private _board; /** Board snapshots for last N plies (index 0 = most recent) */ private _history; private _koPoint; private _currentPlayer; constructor(size?: number); get currentPlayer(): Color; get koPoint(): number; /** Return flat board array (copy). */ get stones(): Color[]; /** Return a history snapshot at depth d (0 = current, 1 = one move ago …). */ historyAt(d: number): Color[]; /** Convert "D4" / "pass" / "resign" to flat board index or -1. */ static gtpToIndex(gtpMove: string, size: number): number; /** Convert flat index back to GTP string. */ static indexToGtp(idx: number, size: number): string; /** Apply a move (GTP string or "pass") to the board. */ applyMove(gtpMove: string): void; /** Reset to empty board (new game). */ reset(): void; private _neighbors; private _groupAndLiberties; /** Remove captured opponent groups; return captured count. */ private _removeCaptures; /** Very simple ko detection: returns the ko point index or -1. */ private _detectKo; } //# sourceMappingURL=KataGoBoard.d.ts.map