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

dealSizesfunction

The cards dealt to each seat in each deal of a game of this length: up to seven, and back down in the long game.

Import it

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

Definition

function dealSizes(size: number): number[]

Parameters

NameTypeDescription
sizenumber

The game’s length or size, as defined by its table specification.

Returns

number[]

The cards dealt to each seat in each deal of a game of this length: up to seven, and back down in the long game.

Examples

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

console.log(dealSizes(CARD_GAME_TABLES.ohHell.defaultSize));
[
  1, 2, 3, 4, 5, 6,
  7, 6, 5, 4, 3, 2,
  1
]

What it prints (run when this page was built)

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