swarmJobs関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Which slot each drone works at at. Drones split across the steps the build order has running, and a step that has not started gets none.
インポート
import { swarmJobs } from "@johnmorrisdotca/uchusen-rockets";
定義
function swarmJobs(steps: readonly PlayStep[], count: number, at: number): SwarmJob[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
count | number | How many drones are on the ship. |
at | number | How far through the build, from 0 to 1. |
戻り値
SwarmJob[]
One job per drone. Empty when nothing is being built, or when the count is 0.
例
import { buildOf, swarmJobs } from "@johnmorrisdotca/uchusen-rockets";
const steps = buildOf("miyamoto");
console.log(steps ? swarmJobs(steps, 24, 0)[0]?.slot : "");drive出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。