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

DiceSourcetype

Where dice come from: each call is the number on one die, 1 to 6.

Import it

import type { DiceSource } from "@johnmorrisdotca/sugoroku";

Definition

type DiceSource = () => number;

Examples

import type { DiceSource } from "@johnmorrisdotca/sugoroku";
import { seededDice } from "@johnmorrisdotca/sugoroku";

const value: DiceSource = seededDice(42);
console.log(value);
[Function (anonymous)]

What it prints (run when this page was built)

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