defaultBoardFor関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The board a game OPENS on, where nothing else has said: its own
defaultBoard if it has one, else the first of its boards.
Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.
インポート
import { defaultBoardFor } from "@johnmorrisdotca/narabe";
定義
function defaultBoardFor(variant: RuleVariant): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
variant | RuleVariant | The native rule variant identifier. |
戻り値
number
The board a game OPENS on, where nothing else has said: its own defaultBoard if it has one, else the first of its boards. Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.
例
import { defaultBoardFor } from "@johnmorrisdotca/narabe";
console.log(defaultBoardFor("reversi"));8出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。