本文へ移動

Narabe並べ

48種類の盤上ゲームを、新しい局面を返す手の操作、合法手の一覧、再生できる棋譜で扱えます。

「並べ」は五目並べの「並べ」。石を並べることを表す言葉です。 名前について(英語)

目次

リファレンス · ルールと棋譜

EndgameCount型

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

An ending that must be won within so many moves or it is a draw, once each player has made movesEach more moves inside it.

endings: named pairings, either side holding either half — three kings against one king, a king and a man against a king. restartsOnChange says what a capture or a crowning that keeps the position inside the set does: lets the count run on (FMJD 6.3, the Brazilian confederation's art. 99), or starts it again, as a count "from when that balance arose" does.

balance: any ending of one of these numbers of pieces in which both sides have a king, counted while the pieces stay exactly as they are — a capture or a crowning always starts it again. The Russian federation's rule, which no list of pairings could state without naming dozens of them.

インポート

import type { EndgameCount } from "@johnmorrisdotca/narabe";

定義

type EndgameCount = {
    kind: "endings";
    endings: readonly (readonly [
        PieceTally,
        PieceTally
    ])[];
    restartsOnChange: boolean;
    movesEach: number;
} | {
    kind: "balance";
    pieces: readonly number[];
    movesEach: number;
};

例

import type { EndgameCount } from "@johnmorrisdotca/narabe";

const value: EndgameCount = {kind:"balance",pieces:[2,2],movesEach:15};
console.log(value);
{ kind: 'balance', pieces: [ 2, 2 ], movesEach: 15 }

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

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

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