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[]; }
引数
| 名前 | 型 | 説明 |
|---|---|---|
mode | GameMode | The native rule-mode key. |
width | number | The native board width in holes. |
height | number | 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: []
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。