Reference · Game engine and table
readHitotsuOptionsfunction
House rules as something sent them, checked for shape, or null.
Import it
import { readHitotsuOptions } from "@johnmorrisdotca/hitotsu";
Definition
function readHitotsuOptions(value: unknown): HitotsuOptions | null
Parameters
| Name | Type | Description |
|---|---|---|
value | unknown | The unknown card, move or rules value to validate. |
Returns
HitotsuOptions | null
Validated house rules, or null when the object does not have the supported fields and values.
Examples
import { HITOTSU_PARTY, readHitotsuOptions } from "@johnmorrisdotca/hitotsu";
console.log(readHitotsuOptions(HITOTSU_PARTY));{
stacking: 'any',
jumpIn: true,
sevenZero: true,
drawToMatch: false,
wildFour: 'challenge',
deal: 5
}What it prints (run when this page was built)