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 · SVG boards and notation

boardSizefunction

The width and height the board is drawn in, which is the other way about when it stands up.

Import it

import { boardSize } from "@johnmorrisdotca/sugoroku/draw";

Definition

function boardSize(options: Pick<BoardOptions, "cube" | "orientation">): { width: number; height: number; }

Parameters

NameTypeDescription
optionsPick<BoardOptions, "cube" | "orientation">

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

Returns

{ width: number; height: number; }

The width and height the board is drawn in, which is the other way about when it stands up.

Examples

import { boardSize } from "@johnmorrisdotca/sugoroku/draw";

console.log(boardSize({cube:true,orientation:"landscape"}));
{ width: 976, height: 552 }

What it prints (run when this page was built)

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