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 · Cribbage

throwWorthfunction

What two cards thrown to a crib are worth to it, roughly: a pair, a fifteen, fives, and cards close enough to run.

Import it

import { throwWorth } from "@johnmorrisdotca/toranpu/cribbage";

Definition

function throwWorth([a, b]: readonly [CardId, CardId]): number

Parameters

NameTypeDescription
optionsreadonly [string, string]

Options for this call; omitted fields retain their documented defaults.

Returns

number

What two cards thrown to a crib are worth to it, roughly: a pair, a fifteen, fives, and cards close enough to run.

Examples

import { throwWorth } from "@johnmorrisdotca/toranpu/cribbage";

console.log(throwWorth(["5H", "JS"]));
3.5

What it prints (run when this page was built)

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