STORIES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The stories, one to a level.
インポート
import { STORIES } from "@johnmorrisdotca/karakuri/levels";
定義
const STORIES: readonly Story[] = [
{
stages: [
{ problem: "rain", tools: ["umbrella", "sunglasses"], right: 0 },
{ problem: "puddle", tools: ["sandals", "boots"], right: 1 },
{ problem: "door", tools: ["key", "balloon"], right: 0 },
],
},
{
stages: [
{ problem: "dark", tools: ["spoon", "flashlight"], right: 1 },
{ problem: "gap", tools: ["plank", "pillow"], right: 0 },
{ problem: "bear", tools: ["ball", "honey"], right: 1 },
],
},
{
stages: [
{ problem: "snow", tools: ["shovel", "kite"], right: 0 },
{ problem: "wind", tools: ["sunhat", "scarf"], right: 1 },
{ problem: "hill", tools: ["sandals", "sled"], right: 1 },
],
},
{
stages: [
{ problem: "sea", tools: ["raft", "ball"], right: 0 },
{ problem: "treasure", tools: ["sandwich", "map"], right: 1 },
{ problem: "chest", tools: ["spoon", "key"], right: 1 },
],
},
]
例
import { STORIES } from "@johnmorrisdotca/karakuri/levels";
import { length } from "@johnmorrisdotca/karakuri/physics";
console.log(STORIES.length);4出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。