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
| Name | Type | Description |
|---|---|---|
worth | number | The estimated number of tricks this hand can win. |
allowed | readonly 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]));1What it prints (run when this page was built)