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

sideIndexfunction

0 for white and 1 for black: where a side's counts are kept in a position.

Import it

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

Definition

function sideIndex(side: Side): 0 | 1

Parameters

NameTypeDescription
sideSide

The side being examined: white or black.

Returns

0 | 1

0 for white and 1 for black: where a side's counts are kept in a position.

Examples

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

console.log(sideIndex("black"));
1

What it prints (run when this page was built)

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