Reference · Game engine and table
readHitotsuMovefunction
A move as something sent it, checked for its shape only: whether it may be made is the rules'.
Import it
import { readHitotsuMove } from "@johnmorrisdotca/hitotsu";
Definition
function readHitotsuMove(value: unknown): HitotsuMove | null
Parameters
| Name | Type | Description |
|---|---|---|
value | unknown | The unknown card, move or rules value to validate. |
Returns
HitotsuMove | null
A structurally valid move, or null for an invalid shape. Use playHitotsu to check whether it is legal now.
Examples
import { readHitotsuMove } from "@johnmorrisdotca/hitotsu";
console.log(readHitotsuMove({ draw: true }));{ draw: true }What it prints (run when this page was built)