Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Shizen and Arashi environments

isEnvironmentTurnScheduledfunction

Pure one-based schedule lookup: frequent is every second turn; rare is every eighth turn.

Import it

import { isEnvironmentTurnScheduled } from "@johnmorrisdotca/houseki/nature";

Definition

function isEnvironmentTurnScheduled(turn: number, schedule: EnvironmentSchedule): boolean

Parameters

NameTypeDescription
turnnumber

The committed placement/turn number tested against the environment schedule.

scheduleEnvironmentSchedule

The native schedule with its authored or periodic trigger settings.

Returns

boolean

Pure one-based schedule lookup: frequent is every second turn; rare is every eighth turn.

Examples

import { isEnvironmentTurnScheduled } from "@johnmorrisdotca/houseki/nature";

console.log(isEnvironmentTurnScheduled(2,{kind:"authored",turns:[2,4]}));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.