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
| Name | Type | Description |
|---|---|---|
rules | Rules | 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)