CribbageHandScoretype
One hand as it was shown: the dealer, the starter, both four-card hands and the crib, and what each counted.
Import it
import type { CribbageHandScore } from "@johnmorrisdotca/toranpu/cribbage";
Definition
type CribbageHandScore = {
dealer: number;
starter: CardId;
hands: [
CardId[],
CardId[]
];
crib: CardId[];
counts: [
CribbageCount,
CribbageCount
];
cribCount: CribbageCount;
};
Members
| Name | Type | Description |
|---|---|---|
dealer | number | |
starter | string | |
hands | [string[], string[]] | |
crib | string[] | |
counts | [CribbageCount, CribbageCount] | |
cribCount | CribbageCount |
Examples
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);9What it prints (run when this page was built)