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 · Oh Hell

chooseOhHellBidfunction

The bid nearest what the hand is worth, among those allowed.

Import it

import { chooseOhHellBid } from "@johnmorrisdotca/toranpu/oh-hell";

Definition

function chooseOhHellBid(worth: number, allowed: readonly number[]): number

Parameters

NameTypeDescription
worthnumber

The estimated number of tricks this hand can win.

allowedreadonly number[]

The legal bids available to this player.

Returns

number

The bid nearest what the hand is worth, among those allowed.

Examples

import { chooseOhHellBid } from "@johnmorrisdotca/toranpu/oh-hell";

console.log(chooseOhHellBid(1.4, [0, 1, 2, 3]));
1

What it prints (run when this page was built)

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