twistRole関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A level's part in its block's lesson, or null for a level that has none (1 to
14, or a 15th or 16th left plain because somebody had played it). newOnes
are the challenges no earlier level of the size has: what a 15th introduces.
インポート
import { twistRole } from "@johnmorrisdotca/tsunagi";
定義
function twistRole(layouts: readonly string[], level: number): TwistRole | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
layouts | readonly string[] | The layout codes in one level collection. |
level | number | The one-based level number. |
戻り値
TwistRole | null
A level's part in its block's lesson, or null for a level that has none (1 to 14, or a 15th or 16th left plain because somebody had played it). newOnes are the challenges no earlier level of the size has: what a 15th introduces.
例
import { twistRole } from "@johnmorrisdotca/tsunagi";
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
console.log(twistRole(TSUNAGI_4.map(([code])=>code),15));null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。