SolidEventDetail型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What every event tells of the board.
インポート
import type { SolidEventDetail } from "@johnmorrisdotca/meikyuu/3d/play";
定義
type SolidEventDetail = {
kind: "solid";
solid: SolidRecipe["kind"];
moves: number;
cells: number;
solved: boolean;
stones: number;
stonesLeft: number | null;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
kind | "solid" | |
solid | SolidKind | |
moves | number | |
cells | number | |
solved | boolean | |
stones | number | |
stonesLeft | number | null |
例
import type { SolidRecipe } from "@johnmorrisdotca/meikyuu/3d";
import { buildSolidMaze } from "@johnmorrisdotca/meikyuu/3d";
import type { SolidEventDetail } from "@johnmorrisdotca/meikyuu/3d/play";
import { stonesLeft } from "@johnmorrisdotca/meikyuu";
const solidRecipe: SolidRecipe = {kind:"cube",n:2,algorithm:"backtracker",seed:42};
const solid = buildSolidMaze(solidRecipe);
const value: SolidEventDetail = {kind:"solid",solid:"cube",moves:0,cells:0,solved:false,stones:0,stonesLeft:null};
console.log(value);{
kind: 'solid',
solid: 'cube',
moves: 0,
cells: 0,
solved: false,
stones: 0,
stonesLeft: null
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。