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

mountHitotsufunction

Put a table of Hitotsu into an element: the person at this screen in seat 0, computers in the rest. Tap a card that glows to play it (a wild asks for a colour, a seven under sevens-and-zeros for a hand to swap with), tap the stock to draw, and call Hitotsu! before the second-last card goes down.

Import it

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

Definition

function mountHitotsu(target: HTMLElement, options?: HitotsuTableOptions): HitotsuHandle

Parameters

NameTypeDescription
targetHTMLElement

The host element, including a host in a shadow root.

options (optional)HitotsuTableOptions

Game settings, private names and presentation choices.

Returns

HitotsuHandle

The live table; destroy it when the host is removed.

Examples

import { mountHitotsu } from "@johnmorrisdotca/hitotsu";
const show = (host: HTMLElement) => mountHitotsu(host, { seed: 42 });
console.log(typeof show);
function

What it prints (run when this page was built)

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