TenkaMap型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A map as the rules read it: its territories, its continents and each territory's neighbours by land and by sea.
インポート
import type { TenkaMap } from "@johnmorrisdotca/tenka";
定義
type TenkaMap = {
key: TenkaMapKey;
name: string;
kanji: string;
territories: readonly TenkaTerritoryData[];
continents: readonly TenkaContinent[];
neighbours: readonly (readonly number[])[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
key | TenkaMapKey | |
name | string | |
kanji | string | |
territories | readonly TenkaTerritoryData[] | |
continents | readonly TenkaContinent[] | |
neighbours | readonly (readonly number[])[] |
例
import type { TenkaMap } from "@johnmorrisdotca/tenka";
import { TENKA_MAPS } from "@johnmorrisdotca/tenka";
const value: TenkaMap = TENKA_MAPS.world;
console.log(value);{
key: 'world',
name: 'The World',
kanji: '世界',
territories: [
{
key: 'alaska',
name: 'Alaska',
continent: 'northAmerica',
land: [Array],
sea: [Array]
},
{
key: 'northwestTerritory',
name: 'Northwest Territory',
continent: 'northAmerica',
land: [Array],
sea: [Array]
},
{
key: 'greenland',
name: 'Greenland',
continent: 'northAmerica',
land: [],
sea: [Array]
},
{
key: 'alberta',
name: 'Alberta',
continent: 'northAmerica',
land: [Array],
sea: []
},
{
key: 'ontario',
name: 'Ontario',
continent: 'northAmerica',
land: [Array],
sea: [Array]
},
{
key: 'quebec',
name: 'Quebec',
continent: 'northAmerica',
land: [Array],
sea: [Array]
},
{
key: 'westernUnitedStates',
name: 'Western United States',
continent: 'northAmerica',
land: [Array],
sea: []
},
{
key: 'easternUnitedStates',
name: 'Eastern United States',
continent: 'northAmerica',
land: [Array],
sea: []
},
{
key: 'centralAmerica',
name: 'Central America',
continent: 'northAmerica',
land: [Array],
sea: []
},
{
key: 'venezuela',
name: 'Venezuela',
continent: 'southAmerica',
land: [Array],
sea: []
},
{
key: 'peru',
name: 'Peru',
continent: 'southAmerica',
land: [Array],
sea: []
},
{
key: 'brazil',
name: 'Brazil',
continent: 'southAmerica',
land: [Array],
sea: [Array]
},
{
key: 'argentina',
name: 'Argentina',
continent: 'southAmerica',
land: [Array],
sea: []
},
{
key: 'iceland',
name: 'Iceland',
continent: 'europe',
land: [],
sea: [Array]
},
{
key: 'scandinavia',
name: 'Scandinavia',
continent: 'europe',
land: [Array],
sea: [Array]
},
{
key: 'greatBritain',
name: 'Great Britain',
continent: 'europe',
land: [],
sea: [Array]
},
{
key: 'northernEurope',
name: 'Northern Europe',
continent: 'europe',
land: [Array],
sea: [Array]
},
{
key: 'westernEurope',
name: 'Western Europe',
continent: 'europe',
land: [Array],
sea: [Array]
},
{
key: 'southernEurope',
name: 'Southern Europe',
continent: 'europe',
land: [Array],
sea: [Array]
},
{
key: 'ukraine',
name: 'Ukraine',
continent: 'europe',
land: [Array],
sea: [Array]
},
{
key: 'northAfrica',
name: 'North Africa',
continent: 'africa',
land: [Array],
sea: [Array]
},
{
key: 'egypt',
name: 'Egypt',
continent: 'africa',
land: [Array],
sea: [Array]
},
{
key: 'eastAfrica',
name: 'East Africa',
continent: 'africa',
land: [Array],
sea: [Array]
},
{
key: 'congo',
name: 'Congo',
continent: 'africa',
land: [Array],
sea: []
},
{
key: 'southAfrica',
name: 'South Africa',
continent: 'africa',
land: [Array],
sea: [Array]
},
{
key: 'madagascar',
name: 'Madagascar',
continent: 'africa',
land: [],
sea: [Array]
},
{
key: 'ural',
name: 'Ural',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'siberia',
name: 'Siberia',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'yakutsk',
name: 'Yakutsk',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'kamchatka',
name: 'Kamchatka',
continent: 'asia',
land: [Array],
sea: [Array]
},
{
key: 'irkutsk',
name: 'Irkutsk',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'mongolia',
name: 'Mongolia',
continent: 'asia',
land: [Array],
sea: [Array]
},
{
key: 'japan',
name: 'Japan',
continent: 'asia',
land: [],
sea: [Array]
},
{
key: 'afghanistan',
name: 'Afghanistan',
continent: 'asia',
land: [Array],
sea: [Array]
},
{
key: 'china',
name: 'China',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'middleEast',
name: 'Middle East',
continent: 'asia',
land: [Array],
sea: [Array]
},
{
key: 'india',
name: 'India',
continent: 'asia',
land: [Array],
sea: []
},
{
key: 'siam',
name: 'Siam',
continent: 'asia',
land: [Array],
sea: [Array]
},
{
key: 'indonesia',
name: 'Indonesia',
continent: 'australia',
land: [],
sea: [Array]
},
{
key: 'newGuinea',
name: 'New Guinea',
continent: 'australia',
land: [],
sea: [Array]
},
{
key: 'westernAustralia',
name: 'Western Australia',
continent: 'australia',
land: [Array],
sea: [Array]
},
{
key: 'easternAustralia',
name: 'Eastern Australia',
continent: 'australia',
land: [Array],
sea: [Array]
}
],
continents: [
{
key: 'northAmerica',
name: 'North America',
kanji: '北米',
bonus: 5,
territories: [Array]
},
{
key: 'southAmerica',
name: 'South America',
kanji: '南米',
bonus: 2,
territories: [Array]
},
{
key: 'europe',
name: 'Europe',
kanji: '欧州',
bonus: 5,
territories: [Array]
},
{
key: 'africa',
name: 'Africa',
kanji: '阿州',
bonus: 3,
territories: [Array]
},
{
key: 'asia',
name: 'Asia',
kanji: '亜州',
bonus: 7,
territories: [Array]
},
{
key: 'australia',
name: 'Australia',
kanji: '豪州',
bonus: 2,
territories: [Array]
}
],
neighbours: [
[ 1, 3, 29 ],
[ 0, 3, 4, 2 ],
[ 1, 4, 5, 13 ],
[ 0, 1, 4, 6 ],
[ 1, 3, 5, 6, 7, 2 ],
[ 4, 7, 2 ],
[ 3, 4, 7, 8 ],
[ 4, 5, 6, 8 ],
[ 6, 7, 9 ],
[ 8, 10, 11 ],
[ 9, 11, 12 ],
[ 9, 10, 12, 20 ],
[ 10, 11 ],
[ 2, 14, 15 ],
[ 16, 19, 13, 15 ],
[ 13, 14, 16, 17 ],
[ 14, 17, 18, 19, 15 ],
[ 16, 18, 15, 20 ],
[ 16, 17, 19, 35, 20, 21 ],
[ 14, 16, 18, 26, 35, 33 ],
[ 21, 22, 23, 11, 17, 18 ],
[ 20, 22, 35, 18 ],
[ 20, 21, 23, 24, 25, 35 ],
[ 20, 22, 24 ],
[ 22, 23, 25 ],
[ 22, 24 ],
[ 19, 27, 33, 34 ],
[ 26, 28, 30, 31, 34 ],
[ 27, 29, 30 ],
[ 28, 30, 31, 0, 32 ],
[ 27, 28, 29, 31 ],
[ 27, 29, 30, 34, 32 ],
[ 29, 31 ],
[ 26, 34, 35, 36, 19 ],
[ 26, 27, 31, 33, 36, 37 ],
[ 18, 19, 21, 33, 36, 22 ],
[ 33, 34, 35, 37 ],
[ 34, 36, 38 ],
[ 37, 39, 40 ],
[ 38, 40, 41 ],
[ 41, 38, 39 ],
[ 40, 39 ]
]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。