Reference · Shizen and Arashi environments
EnvironmentPreviewtype
A native earthquake or lightning preview before it is committed.
Import it
import type { EnvironmentPreview } from "@johnmorrisdotca/houseki/nature";
Definition
type EnvironmentPreview = EarthquakePreview | LightningPreview;
Examples
import { createNatureState, previewLightning } from "@johnmorrisdotca/houseki/nature";
import type { EnvironmentPreview } from "@johnmorrisdotca/houseki/nature";
const state=createNatureState({width:4,height:4,seed:"docs"});
const value: EnvironmentPreview = previewLightning(state,{columns:[0]});
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[
'columns',
'removedCells',
'removedIds',
'cells',
'randomStateAfter'
]What it prints (run when this page was built)