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

HitotsuStringstype

Every table word, including embed errors; hosts may override them with strings.

Import it

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

Definition

type HitotsuStrings = {
    embedError?: string;
    you: string;
    computer: (n: number) => string;
    yourTurn: string;
    toPlay: (who: string) => string;
    follow: (colour: string) => string;
    facing: (who: string, count: number) => string;
    drew: (who: string) => string;
    challengeOpen: (who: string, by: string) => string;
    cards: (count: number) => string;
    points: (count: number) => string;
    draw: string;
    keep: string;
    take: (count: number) => string;
    challenge: string;
    call: string;
    called: string;
    pickColour: string;
    swapWith: (who: string) => string;
    jumpIn: string;
    won: (who: string) => string;
    again: string;
    stock: (count: number) => string;
    inPlay?: string;
    colour: Record<"R" | "Y" | "G" | "B", string>;
    news: {
        caught: (who: string) => string;
        took: (who: string, count: number) => string;
        challenge: (who: string, by: string, guilty: boolean) => string;
        swap: (who: string, other: string) => string;
        rotate: string;
        jump: (who: string) => string;
        skipped: (who: string, you: boolean) => string;
        reversed: string;
        drew: (who: string, count: number) => string;
    };
};

Members

NameTypeDescription
embedError (optional)string | undefined

Shown when a local embed cannot mount with its settings.

youstring
computer(n: number) => string
yourTurnstring
toPlay(who: string) => string
follow(colour: string) => string
facing(who: string, count: number) => string
drew(who: string) => string
challengeOpen(who: string, by: string) => string
cards(count: number) => string
points(count: number) => string
drawstring
keepstring
take(count: number) => string
challengestring
callstring
calledstring
pickColourstring
swapWith(who: string) => string
jumpInstring
won(who: string) => string
againstring
stock(count: number) => string
inPlay (optional)string | undefined

The label under the card in play, matching the one under the draw pile so the two sit level. "In play" when left out.

colourRecord<"R" | "Y" | "G" | "B", string>
news{ caught: (who: string) => string; took: (who: string, count: number) => string; challenge: (who: string, by: string, guilty: boolean) => string; swap: (who: string, other: string) => string; rotate: string; jump: (who: string) => string; skipped: (who: string, you: boolean) => string; reversed: string; drew: (who: string, count: number) => string; }

Examples

import type { HitotsuStrings } from "@johnmorrisdotca/hitotsu";
const words: Partial<HitotsuStrings> = { embedError: "Check the table settings." };
console.log(words.embedError);
Check the table settings.

What it prints (run when this page was built)

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