本文へ移動

Toranpuトランプ

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

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

目次

リファレンス · ジンラミー

GinResult型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

How a hand ended: who scored and how much, and how each hand was laid down.

インポート

import type { GinResult } from "@johnmorrisdotca/toranpu/gin-rummy";

定義

type GinResult = {
    knocker: number | null;
    winner: number | null;
    points: number;
    kind: "gin" | "knock" | "undercut" | "drawn";
    layouts: GinLayout[];
    laidOff: CardId[];
};

メンバー

名前型説明
knockernumber | null

The seat that knocked, or null for a hand drawn with the stock run down.

winnernumber | null

The seat that scored the hand, or null for none.

pointsnumber
kind"gin" | "knock" | "undercut" | "drawn"

"gin" with no deadwood, "knock" won, "undercut" when the other player had no more, "drawn" when the stock ran out.

layoutsGinLayout[]

Each seat's melds and deadwood as scored, after the other player laid off onto a knocker's melds.

laidOffstring[]

The cards the defender laid off onto the knocker's melds.

例

import type { GinResult } from "@johnmorrisdotca/toranpu/gin-rummy";

const value: GinResult = { knocker: null, winner: null, points: 0, kind: "drawn", layouts: [], laidOff: [] };
console.log(value.kind);
drawn

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

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

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