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

presidentTitlefunction

A seat's title from a round's finishing order.

Import it

import { presidentTitle } from "@johnmorrisdotca/toranpu/president";

Definition

function presidentTitle(order: readonly number[], seat: number): PresidentTitle

Parameters

NameTypeDescription
orderreadonly number[]

Seats in their finishing order, from first to last.

seatnumber

The zero-based player seat.

Returns

PresidentTitle

A seat's title from a round's finishing order.

Examples

import { presidentTitle } from "@johnmorrisdotca/toranpu/president";

console.log(presidentTitle([0, 1, 2, 3], 0));
president

What it prints (run when this page was built)

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