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 · Deck tools

seededRandomfunction

A stream of numbers in [0, 1) fixed by a seed.

Import it

import { seededRandom } from "@johnmorrisdotca/toranpu/deck";

Also exported from: @johnmorrisdotca/toranpu

Definition

function seededRandom(seed: number): Random

Parameters

NameTypeDescription
seednumber

The numeric seed that reproduces the same shuffle or deal.

Returns

Random

A stream of numbers in [0, 1) fixed by a seed.

Examples

import { seededRandom } from "@johnmorrisdotca/toranpu/deck";

console.log(seededRandom(42)());
0.6011037519201636

What it prints (run when this page was built)

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