Reference · Rules, maps and records
readTenkaMovefunction
A kept move read back, or null for anything that is not one.
Import it
import { readTenkaMove } from "@johnmorrisdotca/tenka";
Definition
function readTenkaMove(kept: unknown): TenkaMove | null
Parameters
| Name | Type | Description |
|---|---|---|
kept | unknown | The unknown compact move data to parse. |
Returns
TenkaMove | null
The parsed move, or null when the compact shape is not recognized.
Examples
import { readTenkaMove } from "@johnmorrisdotca/tenka";
console.log(readTenkaMove(["t"]));{ kind: 'endTurn' }What it prints (run when this page was built)