本文へ移動

Gunjin軍人

階級を隠す5つの対戦ゲームで、配置を非公開に保ち、表示や再生を共有し、1台の端末を交代して遊べます。

「軍人」は、兵士を表す言葉です。 名前について(英語)

目次

リファレンス · プレイヤーと観戦者の表示

boardFeatures関数

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

Public board markings (camps, headquarters and lakes), with no role-dependent information.

インポート

import { boardFeatures } from "@johnmorrisdotca/gunjin/views";

ほかのエクスポート元: @johnmorrisdotca/gunjin

定義

function boardFeatures(mode: AuthoritativeMatch["mode"], width: number, height: number): { camps: Coordinate[]; headquarters: Coordinate[]; lakes: Coordinate[]; }

引数

名前型説明
modeGameMode

The native rule-mode key.

widthnumber

The native board width in holes.

heightnumber

The native board height in holes.

戻り値

{ camps: Coordinate[]; headquarters: Coordinate[]; lakes: Coordinate[]; }

Public board markings (camps, headquarters and lakes), with no role-dependent information.

例

import { boardFeatures } from "@johnmorrisdotca/gunjin/views";

console.log(boardFeatures("luzhanqi-mini",7,8));
{
  camps: [ { x: 1, y: 3 }, { x: 5, y: 3 }, { x: 1, y: 4 }, { x: 5, y: 4 } ],
  headquarters: [ { x: 1, y: 0 }, { x: 5, y: 0 }, { x: 1, y: 7 }, { x: 5, y: 7 } ],
  lakes: []
}

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

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

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