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

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

NameTypeDescription
handreadonly string[]

The player’s held cards, or the hand number for a deal.

trumpstring

The current trump suit.

seatsnumber

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.3

What it prints (run when this page was built)

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