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

openingFromfunction

An opening throw from a source: one die for white and one for black.

Import it

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

Definition

function openingFrom(source: DiceSource): [number, number]

Parameters

NameTypeDescription
sourceDiceSource

A die source returning a valid integer from 1 to 6.

Returns

[number, number]

An opening throw from a source: one die for white and one for black.

Examples

import { openingFrom, seededDice } from "@johnmorrisdotca/sugoroku";

console.log(openingFrom(seededDice(42)));
[ 4, 3 ]

What it prints (run when this page was built)

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