Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Gin Rummy

deadwoodInfunction

The deadwood left in a hand at its best.

Import it

import { deadwoodIn } from "@johnmorrisdotca/toranpu/gin-rummy";

Definition

function deadwoodIn(hand: readonly CardId[]): number

Parameters

NameTypeDescription
handreadonly string[]

The player’s held cards, or the hand number for a deal.

Returns

number

The deadwood left in a hand at its best.

Examples

import { deadwoodIn } from "@johnmorrisdotca/toranpu/gin-rummy";

console.log(deadwoodIn(["3H", "4H", "5H", "AS"]));
1

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.