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
| Name | Type | Description |
|---|---|---|
game | HitotsuGame | 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));nullWhat it prints (run when this page was built)