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

HitotsuHandletype

Native game access, redealing and presentation updates.

Import it

import type { HitotsuHandle } from "@johnmorrisdotca/hitotsu";

Definition

type HitotsuHandle = {
    game(): HitotsuGame;
    restart(options?: Omit<HitotsuTableOptions, "language" | "strings" | "theme" | "sound" | "onMove">): void;
    set(options: Pick<HitotsuTableOptions, "language" | "strings" | "theme" | "sound" | "onMove">): void;
    destroy(): void;
};

Members

NameTypeDescription
game(): HitotsuGame

The game as it stands.

restart(options?: Omit<HitotsuTableOptions, "language" | "strings" | "theme" | "sound" | "onMove">): void

Deal again, with any options changed.

set(options: Pick<HitotsuTableOptions, "language" | "strings" | "theme" | "sound" | "onMove">): void

Update words, palette, sound and callback while preserving the current game.

destroy(): void

Examples

import type { HitotsuHandle } from "@johnmorrisdotca/hitotsu";
const update = (table: HitotsuHandle) => table.set({ language: "ja" });
console.log(typeof update);
function

What it prints (run when this page was built)

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