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 · Games and state

computerSeatsfunction

The seats a computer plays, one a seat, from what the set-up said: a seat it said nothing about is a person's.

Import it

import { computerSeats } from "@johnmorrisdotca/toranpu";

Definition

function computerSeats(count: number, computers?: readonly boolean[]): boolean[]

Parameters

NameTypeDescription
countnumber

The requested number of cards, sounds or layout positions.

computers (optional)readonly boolean[] | undefined

Flags by seat: true where a computer controls that seat.

Returns

boolean[]

The seats a computer plays, one a seat, from what the set-up said: a seat it said nothing about is a person's.

Examples

import { computerSeats } from "@johnmorrisdotca/toranpu";

console.log(computerSeats(4, [false, true]));
[ false, true, false, false ]

What it prints (run when this page was built)

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