startTenka関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A NEW GAME, all of it drawn from seed: who goes first; the territories
shuffled and dealt round the table one at a time from that player, each
with one army on it (at a table of two, dealt three ways, the neutral army
taking every third); the cards shuffled; and each player's starting armies
(TENKA_STARTING_ARMIES) less the ones already on their territories —
scattered at random when placing is auto, or left to be placed by hand,
one at a time round the table. The neutral army's are always scattered.
Null for a table the game is not offered for, or a seed that is not one.
インポート
import { startTenka } from "@johnmorrisdotca/tenka";
定義
function startTenka(rounds: number, players: readonly string[], seed: number, placing?: TenkaPlacing, map?: TenkaMapKey): TenkaGame | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
rounds | number | The supported round limit for the table. |
players | readonly string[] | The two to six local player names. |
seed | number | The unsigned 32-bit starting seed. |
placing (省略可) | TenkaPlacing | Automatic or manual initial reinforcement placement. |
map (省略可) | TenkaMapKey | The native world or Europe map to use. |
戻り値
TenkaGame | null
The initial game, or null for an invalid round limit, player count, seed, placement or map.
例
import { startTenka } from "@johnmorrisdotca/tenka";
console.log(startTenka(10,["Seat 1","Seat 2"],42)?.phase);reinforce出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。