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

SUGOROKU_BOARDSconstant

The boards the drawing knows by name, set against any theme. Each changes only the surfaces: the frame, the felt, the points, the bar and the trays.

Import it

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

Definition

const SUGOROKU_BOARDS: Readonly<Record<SugorokuBoardName, Pick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">>> = {
    green: { frame: "#5b3a1f", felt: "#2f5d4a", ...POINTS_CLASSIC, bar: "#4a2f19", tray: "#24493a" },
    blue: { frame: "#2c3a52", felt: "#2865a6", pointA: "#dfe6ef", pointB: "#16345c", bar: "#1f2b40", tray: "#1d4d80" },
    red: { frame: "#4a2420", felt: "#a3342e", pointA: "#ecd9b8", pointB: "#43171a", bar: "#3a1c19", tray: "#7f2822" },
    black: { frame: "#1d1f22", felt: "#2f3236", pointA: "#d8d4c6", pointB: "#a3342e", bar: "#141618", tray: "#222427" },
    wood: { frame: "#6b4a2b", felt: "#e2ba7a", pointA: "#f3dfae", pointB: "#7a4a22", bar: "#6b4a2b", tray: "#c4954f" },
}

Members

NameTypeDescription
greenPick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">
bluePick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">
redPick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">
blackPick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">
woodPick<SugorokuColours, "frame" | "felt" | "pointA" | "pointB" | "bar" | "tray">

Examples

import { SUGOROKU_BOARDS } from "@johnmorrisdotca/sugoroku/draw";
console.log(SUGOROKU_BOARDS);
{
  green: {
    frame: '#5b3a1f',
    felt: '#2f5d4a',
    pointA: '#e7d8b1',
    pointB: '#8e3a2b',
    bar: '#4a2f19',
    tray: '#24493a'
  },
  blue: {
    frame: '#2c3a52',
    felt: '#2865a6',
    pointA: '#dfe6ef',
    pointB: '#16345c',
    bar: '#1f2b40',
    tray: '#1d4d80'
  },
  red: {
    frame: '#4a2420',
    felt: '#a3342e',
    pointA: '#ecd9b8',
    pointB: '#43171a',
    bar: '#3a1c19',
    tray: '#7f2822'
  },
  black: {
    frame: '#1d1f22',
    felt: '#2f3236',
    pointA: '#d8d4c6',
    pointB: '#a3342e',
    bar: '#141618',
    tray: '#222427'
  },
  wood: {
    frame: '#6b4a2b',
    felt: '#e2ba7a',
    pointA: '#f3dfae',
    pointB: '#7a4a22',
    bar: '#6b4a2b',
    tray: '#c4954f'
  }
}

What it prints (run when this page was built)

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