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

hitotsuComputerJumpfunction

A computer's card played out of turn, where the table jumps in: the first computer seat round from the player to move that holds a card identical to the top one. Null when none can, or jump-in is not played.

Import it

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

Definition

function hitotsuComputerJump(game: HitotsuGame): HitotsuMove | null

Parameters

NameTypeDescription
gameHitotsuGame

The current native game; it is left unchanged.

Returns

HitotsuMove | null

A computer's card played out of turn, where the table jumps in: the first computer seat round from the player to move that holds a card identical to the top one. null when none can, or jump-in is not played.

Examples

import { HITOTSU_CLASSIC, hitotsuComputerJump, startHitotsu } from "@johnmorrisdotca/hitotsu";

const game = startHitotsu(1, ["Aki", "Ben"], 42, HITOTSU_CLASSIC, [true, true])!;
console.log(hitotsuComputerJump(game));
null

What it prints (run when this page was built)

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