Reference · Game engine and table
HitotsuMovetype
One move: a card played, a draw, a turn passed, a pending draw taken, a Wild Draw Four challenged, or a card played out of turn.
Import it
import type { HitotsuMove } from "@johnmorrisdotca/hitotsu";
Definition
type HitotsuMove = {
play: HitotsuCard;
colour?: HitotsuColour;
swap?: number;
call?: boolean;
} | {
draw: true;
} | {
pass: true;
} | {
take: true;
} | {
challenge: true;
} | {
jump: HitotsuCard;
seat: number;
colour?: HitotsuColour;
swap?: number;
call?: boolean;
};
Examples
import type { HitotsuMove } from "@johnmorrisdotca/hitotsu";
const value: HitotsuMove = { draw: true };
console.log(value);{ draw: true }What it prints (run when this page was built)