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

mixSeedfunction

Two numbers folded into one seed, so each deal of a game (and each reshuffle within one) has its own order.

Import it

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

Definition

function mixSeed(seed: number, salt: number): number

Parameters

NameTypeDescription
seednumber

The numeric seed that reproduces the same shuffle or deal.

saltnumber

The extra value mixed into a seeded shuffle.

Returns

number

Two numbers folded into one seed, so each deal of a game (and each reshuffle within one) has its own order.

Examples

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

console.log(mixSeed(42, 1));
1621367061

What it prints (run when this page was built)

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