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

hashSeedfunction

A whole number from a seed given as a number or as text: the same seed is always the same number, in every browser and every Node.

Import it

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

Definition

function hashSeed(seed: number | string): number

Parameters

NameTypeDescription
seedstring | number

A reproducible numeric or text seed.

Returns

number

A whole number from a seed given as a number or as text: the same seed is always the same number, in every browser and every Node.

Examples

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

console.log(hashSeed("sample"));
2531492519

What it prints (run when this page was built)

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