GinLayouttype
Each hand's player, laid out: their melds, and the cards left over.
Import it
import type { GinLayout } from "@johnmorrisdotca/toranpu/gin-rummy";
Definition
type GinLayout = {
melds: GinMeld[];
deadwood: CardId[];
};
Members
| Name | Type | Description |
|---|---|---|
melds | GinMeld[] | |
deadwood | string[] |
Examples
import type { GinLayout } from "@johnmorrisdotca/toranpu/gin-rummy";
import { bestLayout } from "@johnmorrisdotca/toranpu/gin-rummy";
const value: GinLayout = bestLayout(["3H", "4H", "5H", "AS"]);
console.log(value.deadwood);[ 'AS' ]What it prints (run when this page was built)