本文へ移動

Narabe並べ

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

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

目次

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

Handicap型

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

Extra restrictions one colour plays under, so a stronger player can give a weaker one a fair game. Every item is a rule some variant already imposes on a colour, applied here on top of whatever the variant says. A handicap belongs to a colour, not a seat, so seat swaps are off while one is set.

doubleThree / doubleFour / overline: shapes this colour may not make. exactLine: this colour's overline is not a win. openLine: this colour's winning line must not be shut in at both ends. longerLine: this colour needs one more stone in a row. singleStone: one stone a turn where the variant gives two. noCaptures: this colour does not capture, in the capture variants. secondStoneExclusion: this colour's second stone must land outside the central square of this half-width (2 for 5×5, 3 for 7×7); 0 for none.

インポート

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

定義

type Handicap = {
    stone: Stone | null;
    doubleThree: boolean;
    doubleFour: boolean;
    overline: boolean;
    exactLine: boolean;
    openLine: boolean;
    longerLine: boolean;
    singleStone: boolean;
    noCaptures: boolean;
    secondStoneExclusion: number;
};

メンバー

名前型説明
stoneStone | null
doubleThreeboolean
doubleFourboolean
overlineboolean
exactLineboolean
openLineboolean
longerLineboolean
singleStoneboolean
noCapturesboolean
secondStoneExclusionnumber

例

import type { Handicap } from "@johnmorrisdotca/narabe";
import { NO_HANDICAP } from "@johnmorrisdotca/narabe";

const value: Handicap = {...NO_HANDICAP,stone:"black",doubleThree:true};
console.log(value);
{
  stone: 'black',
  doubleThree: true,
  doubleFour: false,
  overline: false,
  exactLine: false,
  openLine: false,
  longerLine: false,
  singleStone: false,
  noCaptures: false,
  secondStoneExclusion: 0
}

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

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

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