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

newGamefunction

A new game, waiting for the opening throw.

Import it

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

Definition

function newGame(settings: Settings, options?: NewGameOptions): GameState

Parameters

NameTypeDescription
settingsSettings

The resolved variant and complete rules.

options (optional)NewGameOptions

Native drawing, geometry, mounting or computer choices specified by the signature.

Returns

GameState

A new game, waiting for the opening throw.

Examples

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

const settings = settingsFor("backgammon",{points:5,cube:true});
console.log(newGame(settings).phase);
opening

What it prints (run when this page was built)

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