GoFishEvent型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What the whole table saw of a turn: who asked whom for what, how many cards
were handed over, and — when none were — whether the card drawn from the
pond was the rank asked for (which is shown, and earns another ask). A card
drawn for any other reason is drawn face down: drew says only that it was.
インポート
import type { GoFishEvent } from "@johnmorrisdotca/toranpu/go-fish";
定義
type GoFishEvent = {
kind: "ask";
seat: number;
asked: number;
rank: CardRank;
got: number;
fished: "caught" | "missed" | "dry" | null;
} | {
kind: "draw";
seat: number;
} | {
kind: "book";
seat: number;
rank: CardRank;
};
例
import type { GoFishEvent } from "@johnmorrisdotca/toranpu/go-fish";
const value: GoFishEvent = { kind: "book", seat: 0, rank: 1 };
console.log(value.kind);book出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。