Reference · Shizen and Arashi environments
NatureEntitytype
Stable board occupant. Obstacles collide and block attraction but cannot move or attract.
Import it
import type { NatureEntity } from "@johnmorrisdotca/houseki/nature";
Definition
interface NatureEntity {
readonly id: number;
readonly kind: 'stone' | 'obstacle';
readonly colour?: string;
readonly magnetic?: boolean;
readonly anchored?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
id | number | |
kind | "stone" | "obstacle" | |
colour (optional) | string | undefined | |
magnetic (optional) | boolean | undefined | |
anchored (optional) | boolean | undefined |
Examples
import type { NatureEntity } from "@johnmorrisdotca/houseki/nature";
const value: NatureEntity = {id:1,kind:"stone",colour:"red"};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'id', 'kind', 'colour' ]What it prints (run when this page was built)