本文へ移動

Toranpuトランプ

デッキを使い、11種類のゲームでコンピューターと対戦し、ソリティアを解いたり、独自の絵柄でカードを表示したりできます。

「トランプ」は、日本語で playing cards を指す言葉です。 名前について(英語)

目次

リファレンス · ゴーフィッシュ

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/toranpu 2.15.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。