Interface: Game
A game: frozen, plain data. JSON.stringify(game) gives these fields. Only values made by this module's functions are games; a copy or a plain object is refused.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
current | readonly | { children: readonly string[]; comment: string | null; id: string; marks: readonly Mark[]; parentId: string | null; } | The move being viewed: where it sits in the record, and its marks and comment. |
current.children | readonly | readonly string[] | - |
current.comment | readonly | string | null | - |
current.id | readonly | string | - |
current.marks | readonly | readonly Mark[] | - |
current.parentId | readonly | string | null | - |
komi | readonly | number | Points added to White's score. |
lastMove | readonly | Move | null | - |
mode | readonly | Mode | - |
moveNumber | readonly | number | - |
moves | readonly | readonly MoveSummary[] | Every move in the record, parents before children, variations in order. |
phase | readonly | "playing" | "scoring" | "over" | 'scoring' after two passes in a row, while groups are marked; 'over' at the move where the game ended (an accepted score, a resignation, or a file's result). Moves wait in both. |
prisoners | readonly | Readonly<Record<Color, number>> | Stones each side has captured. |
rules | readonly | Rules | - |
score | readonly | Score | null | The count while scoring and once the game is over; null while playing. |
size | readonly | Size | - |
stones | readonly | readonly Readonly<Stone>[] | The position at the move being viewed. |
toPlay | readonly | Color | - |