本文へ移動

Sugoroku双六

標準の規則、キューブ、試合の得点、シード付きのサイコロ、再生できる記録で、バックギャモンと仲間のゲームを遊べます。

「双六」は、盤と駒で遊ぶゲームの名前です。 名前について(英語)

目次

リファレンス · 規則・ゲーム・記録

Move型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

ONE CHECKER MOVED BY ONE DIE, in the mover's own numbering: from its own point from (or the BAR, 25, for a checker entering from the bar or from off the board at the start of a race) to its own point to (0 for borne off). A move that lands on a lone checker of the other side hits it.

インポート

import type { Move } from "@johnmorrisdotca/sugoroku";

定義

type Move = {
    readonly from: number;
    readonly to: number;
    readonly die: number;
    readonly hit: boolean;
};

メンバー

名前型説明
fromnumber
tonumber
dienumber

The number on the die that moved it. A checker borne off with a larger die than it needed has die greater than from.

hitboolean

Whether it hit a checker, which went to the other side's bar.

例

import { legalPlaysOf, newGame, rollOpening, settingsFor } from "@johnmorrisdotca/sugoroku";
import type { Move } from "@johnmorrisdotca/sugoroku";

const settings = settingsFor("backgammon",{points:5,cube:true});
const game = rollOpening(newGame(settings),[3,1]);
const play = legalPlaysOf(game)[0];
const move = play.moves[0];
const value: Move = move;
console.log(value);
{ from: 24, to: 21, die: 3, hit: false }

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/sugoroku 1.1.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。