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 · Card sounds

soundTimesfunction

When each of count sounds starts, in milliseconds from the first: one every gap, and no more than MOST_SOUNDS_AT_ONCE, spread over the same time.

Import it

import { soundTimes } from "@johnmorrisdotca/hitotsu/card-sounds";

Definition

function soundTimes(count: number, gap?: number): number[]

Parameters

NameTypeDescription
countnumber

The number of sounds or seats, according to the call.

gap (optional)number

Milliseconds between successive sounds.

Returns

number[]

The scheduled start offsets in milliseconds, capped at MOST_SOUNDS_AT_ONCE.

Examples

import { soundTimes } from "@johnmorrisdotca/hitotsu/card-sounds";

console.log(soundTimes(5, 80));
[ 0, 80, 160, 240, 320 ]

What it prints (run when this page was built)

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