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

rollFromfunction

A roll of count dice from a source.

Import it

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

Definition

function rollFrom(source: DiceSource, count?: number): number[]

Parameters

NameTypeDescription
sourceDiceSource

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

count (optional)number

The number of dice to throw.

Returns

number[]

A roll of count dice from a source.

Examples

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

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

What it prints (run when this page was built)

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