GameInfo型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a game of the package is, for a chooser.
インポート
import type { GameInfo } from "@johnmorrisdotca/karakuri/play";
ほかのエクスポート元: @johnmorrisdotca/karakuri
定義
interface GameInfo {
id: string;
levels: number;
gesture: "drag" | "tap";
physics: boolean;
create(level: number): Controller;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | string | |
levels | number | How many levels it has. |
gesture | "drag" | "tap" | |
physics | boolean | Whether it runs a physics simulation, stepped sixty times a second. |
create | (level: number): Controller | Builds a controller for a level (from 1). |
例
import type { GameInfo } from "@johnmorrisdotca/karakuri/play";
import { KARAKURI_GAMES } from "@johnmorrisdotca/karakuri/play";
const value: GameInfo = KARAKURI_GAMES["tube-sort"];
console.log(value);{
id: 'tube-sort',
levels: 5,
gesture: 'tap',
physics: false,
create: [Function: tubeSortController]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。