ohHellWorthfunction
The tricks a hand should take with these trumps, roughly.
Import it
import { ohHellWorth } from "@johnmorrisdotca/toranpu/oh-hell";
Definition
function ohHellWorth(hand: readonly CardId[], trump: string, seats: number): number
Parameters
| Name | Type | Description |
|---|---|---|
hand | readonly string[] | The player’s held cards, or the hand number for a deal. |
trump | string | The current trump suit. |
seats | number | The seat count or seat state supplied by this API. |
Returns
number
The tricks a hand should take with these trumps, roughly.
Examples
import { CARD_GAME_TABLES, newGame } from "@johnmorrisdotca/toranpu";
import { ohHellWorth } from "@johnmorrisdotca/toranpu/oh-hell";
const names = Array.from({ length: CARD_GAME_TABLES.ohHell.defaultPlayers }, (_, seat) => `Seat ${seat + 1}`);
let game = newGame("ohHell", { players: names, seed: 42 })!;
console.log(ohHellWorth(game.hands[0]!, game.trump, game.players.length));0.3What it prints (run when this page was built)