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

CribbageCounttype

What a hand's show is worth, by kind.

Import it

import type { CribbageCount } from "@johnmorrisdotca/toranpu/cribbage";

Definition

type CribbageCount = {
    fifteens: number;
    pairs: number;
    runs: number;
    flush: number;
    nobs: number;
    total: number;
};

Members

NameTypeDescription
fifteensnumber
pairsnumber
runsnumber
flushnumber
nobsnumber
totalnumber

Examples

import type { CribbageCount } from "@johnmorrisdotca/toranpu/cribbage";
import { showCount } from "@johnmorrisdotca/toranpu/cribbage";

const value: CribbageCount = showCount(["5H", "5D", "5C", "JS"], "5S");
console.log(value.total);
29

What it prints (run when this page was built)

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