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

handPointsfunction

What a hand scores: one to the makers for three or four tricks, two for all five, and two to the other side when the makers take two or fewer.

Import it

import { handPoints } from "@johnmorrisdotca/toranpu/euchre";

Definition

function handPoints(makers: 0 | 1, tricks: number): [number, number]

Parameters

NameTypeDescription
makers0 | 1

Factories for the host’s custom card designs.

tricksnumber

The number of tricks won.

Returns

[number, number]

What a hand scores: one to the makers for three or four tricks, two for all five, and two to the other side when the makers take two or fewer.

Examples

import { handPoints } from "@johnmorrisdotca/toranpu/euchre";

console.log(handPoints(0, 3));
[ 1, 0 ]

What it prints (run when this page was built)

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