UNPKG

earley-sgf

Version:

Early algorithm used to parse SGF file

37 lines (36 loc) 647 B
export interface Move { move: string; position?: string; } export interface Stone { stone: string; positions: string[]; } export interface Score { score: string; positions: string[]; } export interface Komi { komi: string; } export interface Size { size: string; } export interface Date { date: string; } export interface Result { result: string; } export interface Player { player: string; name: string; } export type Prop = Move | Stone | Score | Komi | Player | Date | Size | Result; export interface Node { props: Prop[]; } export interface Tree { nodes: Node[]; children: Tree[]; }