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

hitotsuCardShapesfunction

The shapes of one card, in drawing order: a face, or the back for null. called marks a wild on the pile with the colour it called.

Import it

import { hitotsuCardShapes } from "@johnmorrisdotca/hitotsu";

Definition

function hitotsuCardShapes(card: HitotsuCard | null, called?: HitotsuColour): HitotsuShape[]

Parameters

NameTypeDescription
cardstring | null

The physical card id; null draws the back where supported.

called (optional)HitotsuColour | undefined

The colour called by a wild card on the pile.

Returns

HitotsuShape[]

The shapes of one card, in drawing order: a face, or the back for null. called marks a wild on the pile with the colour it called.

Examples

import { hitotsuCardShapes } from "@johnmorrisdotca/hitotsu";

console.log(hitotsuCardShapes("R70").map((shape) => shape.kind));
[
  'rect', 'rect',
  'rect', 'text',
  'text', 'text',
  'text', 'text'
]

What it prints (run when this page was built)

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