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 · Hearts

passOffsetfunction

How far round the table the cards go this deal: 1 to the left, seats − 1 to the right, 2 across, 0 held.

Import it

import { passOffset } from "@johnmorrisdotca/toranpu/hearts";

Definition

function passOffset(deal: number, seats: number): number

Parameters

NameTypeDescription
dealnumber

The deal number or dealing specification.

seatsnumber

The seat count or seat state supplied by this API.

Returns

number

How far round the table the cards go this deal: 1 to the left, seats − 1 to the right, 2 across, 0 held.

Examples

import { passOffset } from "@johnmorrisdotca/toranpu/hearts";

console.log(passOffset(0, 4));
1

What it prints (run when this page was built)

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