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

longestColourfunction

The colour this hand holds most of, red first among equals so the choice is always the same.

Import it

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

Definition

function longestColour(hand: readonly HitotsuCard[]): HitotsuColour

Parameters

NameTypeDescription
handreadonly string[]

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

Returns

HitotsuColour

The colour this hand holds most of, red first among equals so the choice is always the same.

Examples

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

console.log(longestColour(["R70", "R20", "B50"]));
R

What it prints (run when this page was built)

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