goban
Version:
[](https://opensource.org/licenses/Apache-2.0) [](https://deepwiki.com/online-go/goban)
24 lines (23 loc) • 798 B
TypeScript
/** 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;
}