showCountfunction
What four cards and the starter are worth in the show. A crib's flush counts only when all five are one suit.
Import it
import { showCount } from "@johnmorrisdotca/toranpu/cribbage";
Definition
function showCount(four: readonly CardId[], starter: CardId, crib?: boolean): CribbageCount
Parameters
| Name | Type | Description |
|---|---|---|
four | readonly string[] | The four cards retained for cribbage scoring. |
starter | string | The turned-up starter card. |
crib (optional) | boolean | Whether the scored hand is the crib. |
Returns
CribbageCount
What four cards and the starter are worth in the show. A crib's flush counts only when all five are one suit.
Examples
import { showCount } from "@johnmorrisdotca/toranpu/cribbage";
console.log(showCount(["5H", "5D", "5C", "JS"], "5S"));{ fifteens: 16, pairs: 12, runs: 0, flush: 0, nobs: 1, total: 29 }What it prints (run when this page was built)