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[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
knocker | number | null | The seat that knocked, or null for a hand drawn with the stock run down. |
winner | number | null | The seat that scored the hand, or null for none. |
points | number | |
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. |
layouts | GinLayout[] | Each seat's melds and deadwood as scored, after the other player laid off onto a knocker's melds. |
laidOff | string[] | 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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。