TenkaLand型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One territory as a drawing needs it.
インポート
import type { TenkaLand } from "@johnmorrisdotca/tenka/ui";
定義
type TenkaLand = {
territory: number;
key: string;
name: string;
outline: string;
fill: string;
ring: TenkaRing;
at: readonly [
number,
number
];
armies: number;
owner: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
territory | number | Its number. |
key | string | Its key, such as |
name | string | Its name in English. |
outline | string | Its outline, one SVG path in map units. |
fill | string | The colour of whoever holds it. |
ring | TenkaRing | How it is ringed, if it is. |
at | readonly [number, number] | Where its counter stands, in map units. |
armies | number | The armies standing on it. |
owner | number | The seat that holds it, or |
例
import { startTenka } from "@johnmorrisdotca/tenka";
import type { TenkaLand } from "@johnmorrisdotca/tenka/ui";
import { tenkaMapModel } from "@johnmorrisdotca/tenka/ui";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
const value: TenkaLand = tenkaMapModel(game).lands[0];
console.log(value);{
territory: 0,
key: 'alaska',
name: 'Alaska',
outline: 'M21 176l11-1 6-4 1-4 6-6 0 2 1-1 4 0 5-3 0 2 1 0 0-1 3-1-4-1 4-2 1 0-1 1 8-1 4-2 2-3 7 2-3 2 0 1 3 0 2-2 2 0 1 1-1 0 0 1 3 1 6-2 5 1-1 3 4 0-1 1 4 1 0-1 13 0 2 2 2-1 0 1 2 0 0 1 11 0 3 1 0 1 3 0 1-1 10 0 6 4 3 0 0 84 2 1 1 0 0-1 2 1 6-1-2 4 2-1 8 6 1 2-3 1 0-1-2 0 0-1-8-3 0-1 1 0 0-3-3 2-7-1 1-1-1-1 0 1-4-1-8 0-3 1-1-2-3-1 0-2-3 2-3-1 1-2-4 0-1-3 2-1-2 0 0 1-2 1 0-1-1 0 0 1-4 0 1-2-1 0 0 1-2 0 0 2-2 0 2 1 0 1 2 0-3 5-3 0-1-1 0 1-2 0 0 2-1-1 0 1-4 2-1-1-2 3-1-1 0 1-4 0 1-2 2 0 2-2-1-1-1 2-3-1 3-5 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-2 0-5-6-3-1-1-5 3 2 1-2 3 4 1 0-1 1 2 1-1 1 1 0 1 2 2 0 2 2 6 2-1 3 1 3zM37 216l1 0 0 1zM41 194l2 0 2 4-3-2zM19 181l-1 0 1-1zM14 253l8-1 2 0 0 3-1 1-4 0zM21 256l1 1-1 0zM194 275l-4-1 0 2-5-4 0-2 4-1 1 2 1-1 3 1-1 2zM84 276l2-2 2 0 0 1 2 1-1-4 4 1 0-2 2 2 2-1 1 3-3 0-1 2-2 0-2 2-3-1 0 2zM90 279l0 1-1 1-1 0 0-1z',
fill: '#3a6fb5',
ring: null,
at: [ 99, 216 ],
armies: 4,
owner: 1
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。