Skip to the content

Sugoroku双六

Play backgammon and its relatives with native rules, cube and match scoring, seeded dice and replayable records.

Sugoroku is the Japanese name 双六 for games of tables. About the name

Contents

Reference · Rules, games and records

seededRandomfunction

The mulberry32 stream: the same seed makes the same numbers everywhere.

Import it

import { seededRandom } from "@johnmorrisdotca/sugoroku";

Definition

function seededRandom(seed: number | string): Random

Parameters

NameTypeDescription
seedstring | number

A reproducible numeric or text seed.

Returns

Random

The mulberry32 stream: the same seed makes the same numbers everywhere.

Examples

import { seededRandom } from "@johnmorrisdotca/sugoroku";

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/sugoroku 1.1.1.