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

reshuffledfunction

These cards shuffled again, the same way for the same seed and salt: a pile turned over to make a new stock.

Import it

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

Definition

function reshuffled(cards: readonly CardId[], seed: number, salt: number): CardId[]

Parameters

NameTypeDescription
cardsreadonly string[]

The cards in their current order.

seednumber

The numeric seed that reproduces the same shuffle or deal.

saltnumber

The extra value mixed into a seeded shuffle.

Returns

string[]

These cards shuffled again, the same way for the same seed and salt: a pile turned over to make a new stock.

Examples

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

console.log(reshuffled(["AS", "KH", "TD"], 42, 1));
[ 'AS', 'KH', 'TD' ]

What it prints (run when this page was built)

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