本文へ移動

Narabe並べ

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

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

目次

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

Move型

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

A move rebuilt by the engine, including captures and other replay effects.

インポート

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

定義

type Move = Point & {
    stone: Stone;
    by?: Stone;
    kind: MoveKind;
    captured?: Point[];
    from?: Point;
    twist?: Twist;
    cleared?: Cell[];
    cells?: PieceCell[];
    wasKing?: boolean;
    capturedWasKing?: boolean;
    continuedChain?: boolean;
    crowned?: boolean;
    forced?: boolean;
    headStart?: boolean;
    koPointBefore?: Point | null;
};

メンバー

名前型説明
rownumber
colnumber
stoneStone

The colour of the stone placed.

by (省略可)Stone | undefined

The colour that moved, when the game lets a mover place the other colour.

kindMoveKind
captured (省略可)Point[] | undefined

Opponent stones this move took off the board, in the capture variants.

from (省略可)Point | undefined

Where a moving piece came from. Only on move kinds.

twist (省略可)Twist | undefined

The twist that finished this move, once it has been made.

cleared (省略可)Cell[] | undefined

The bottom row this move cleared, so it can be put back by an undo.

cells (省略可)PieceCell[] | undefined

The cells a piece covered, with their colours, on piece kinds.

wasKing (省略可)boolean | undefined

Whether the piece making this move was already a king. Checkers only, for undo.

capturedWasKing (省略可)boolean | undefined

Whether the piece this move captured was itself a king. Checkers only, for undo.

continuedChain (省略可)boolean | undefined

Whether this move continued a capture chain already under way. Checkers only, for undo.

crowned (省略可)boolean | undefined

Whether this move crowned the piece that made it. Checkers only, and only where it did: an endgame count reads the record back to the move that entered its ending, and a man becoming a king changes which ending it is.

forced (省略可)boolean | undefined

On a pass: whether it was forced — the colour had nothing it could play — rather than chosen, as a pass in Go is. Set by passTurn when the pass is made, so a replay of the record sets it again; never stored.

headStart (省略可)boolean | undefined

On a pass: whether it was a turn the other colour's head start took — see owesHeadStart. Set by passTurn from the position, like forced, and never stored.

koPointBefore (省略可)Point | null | undefined

The ko point in force just before this move, so undo can put it back. Go only.

例

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

const value: Move = {row:7,col:7,stone:"black",kind:"place"};
console.log(value);
{ row: 7, col: 7, stone: 'black', kind: 'place' }

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

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

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