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

sortHitotsufunction

A hand as a player holds it: by colour, numbers then actions, the wilds last.

Import it

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

Definition

function sortHitotsu(hand: readonly HitotsuCard[]): HitotsuCard[]

Parameters

NameTypeDescription
handreadonly string[]

The hand number for deterministic shuffling, or the held cards where an array is accepted.

Returns

string[]

A hand as a player holds it: by colour, numbers then actions, the wilds last.

Examples

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

console.log(sortHitotsu(["WW0", "B20", "R70"]));
[ 'R70', 'B20', 'WW0' ]

What it prints (run when this page was built)

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