deadwoodOffunction
What a list of cards counts as deadwood, added up.
Import it
import { deadwoodOf } from "@johnmorrisdotca/toranpu/gin-rummy";
Definition
function deadwoodOf(cards: readonly CardId[]): number
Parameters
| Name | Type | Description |
|---|---|---|
cards | readonly string[] | The cards in their current order. |
Returns
number
What a list of cards counts as deadwood, added up.
Examples
import { deadwoodOf } from "@johnmorrisdotca/toranpu/gin-rummy";
console.log(deadwoodOf(["AS", "KS"]));11What it prints (run when this page was built)