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

rulesProblemsfunction

What goes wrong with a set of rules, as sentences; empty when they are fine.

Import it

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

Definition

function rulesProblems(rules: Rules, variant?: VariantSpec): string[]

Parameters

NameTypeDescription
rulesRules

The complete or partial native rules specified by the signature.

variant (optional)VariantSpec | undefined

The variant key or resolved specification.

Returns

string[]

What goes wrong with a set of rules, as sentences; empty when they are fine.

Examples

import { rulesProblems, settingsFor } from "@johnmorrisdotca/sugoroku";

const settings = settingsFor("backgammon",{points:5,cube:true});
const spec = settings.variant;
console.log(rulesProblems(settings.rules,spec));
[]

What it prints (run when this page was built)

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