UNPKG

goban

Version:

[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/online-go/goban)

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; }