Skip to the content

Hitotsu一つ

Match the colour or number, call with one card left, and play classic or party rules against computers or at a shared table.

Hitotsu is Japanese for one: the call with one card left. About the name

Contents

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

NameTypeDescription
valueunknown

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hitotsu 1.4.0.