CribbageHandScore型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One hand as it was shown: the dealer, the starter, both four-card hands and the crib, and what each counted.
インポート
import type { CribbageHandScore } from "@johnmorrisdotca/toranpu/cribbage";
定義
type CribbageHandScore = {
dealer: number;
starter: CardId;
hands: [
CardId[],
CardId[]
];
crib: CardId[];
counts: [
CribbageCount,
CribbageCount
];
cribCount: CribbageCount;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
dealer | number | |
starter | string | |
hands | [string[], string[]] | |
crib | string[] | |
counts | [CribbageCount, CribbageCount] | |
cribCount | CribbageCount |
例
import type { CribbageHandScore } from "@johnmorrisdotca/toranpu/cribbage";
import { showCount } from "@johnmorrisdotca/toranpu/cribbage";
const value: CribbageHandScore = { dealer: 0, starter: "5S", hands: [["5H", "5D", "5C", "JS"], ["AH", "2D", "3C", "4S"]], crib: ["6H", "7D", "8C", "9S"], counts: [showCount(["5H", "5D", "5C", "JS"], "5S"), showCount(["AH", "2D", "3C", "4S"], "5S")], cribCount: showCount(["6H", "7D", "8C", "9S"], "5S", true) };
console.log(value.cribCount.total);9出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。