Reference · Game engine and table
HitotsuNewstype
Something that happened in the last move, for the table to say: nothing a player could not have seen.
Import it
import type { HitotsuNews } from "@johnmorrisdotca/hitotsu";
Definition
type HitotsuNews = {
kind: "caught";
seat: number;
} | {
kind: "took";
seat: number;
count: number;
} | {
kind: "challenge";
seat: number;
by: number;
guilty: boolean;
} | {
kind: "swap";
seat: number;
with: number;
} | {
kind: "rotate";
direction: 1 | -1;
} | {
kind: "jump";
seat: number;
} | {
kind: "skipped";
seat: number;
} | {
kind: "reversed";
} | {
kind: "drew";
seat: number;
count: number;
};
Examples
import type { HitotsuNews } from "@johnmorrisdotca/hitotsu";
const value: HitotsuNews = { kind: "drew", seat: 0, count: 1 };
console.log(value.kind);drewWhat it prints (run when this page was built)