UNPKG

goban-engine

Version:

This contains the built Go engine that is used by the Goban package. There are no display components in this package, only the logic for playing the game of Go, making it suitable for usage in node.js or other server-side environments.

24 lines (23 loc) 798 B
/** A branch in the conditional move tree, consists of the response move and * the sub-tree of the next possible moves */ export type ConditionalMoveResponse = [ /** response_move */ string | null, /** next move tree */ ConditionalMoveResponseTree ]; export interface ConditionalMoveResponseTree { [move: string]: ConditionalMoveResponse; } export declare class ConditionalMoveTree { children: { [move: string]: ConditionalMoveTree; }; parent?: ConditionalMoveTree; move: string | null; constructor(move: string | null, parent?: ConditionalMoveTree); encode(): ConditionalMoveResponse; static decode(data: ConditionalMoveResponse): ConditionalMoveTree; getChild(mv: string): ConditionalMoveTree; duplicate(): ConditionalMoveTree; }