clik-engine API
    Preparing search index...

    Interface ScenarioContext

    Live context handed to a ScenarioStrategy on every frame and to shouldAbort / collectMetrics callbacks. The runner builds and mutates this in-place per instance.

    interface ScenarioContext {
        frame: number;
        game: Game;
        random: SeededRandom;
        scripted: ScriptedProvider;
        seed: number;
        time: number;
        snapshot(): Record<string, unknown>;
    }
    Index

    Properties

    frame: number

    Frame counter, increments before each step.

    game: Game

    The headless Phaser game.

    random: SeededRandom

    Per-instance deterministic RNG (seeded from the run seed).

    The scripted input provider — write actions onto this.

    seed: number

    This run's seed.

    time: number

    Synthetic clock (ms) at the start of the current step.

    Methods

    • Snapshot of every state registered via BaseScene.inspectState() on the currently-active scene, plus a few engine fields. Cheap to call.

      Returns Record<string, unknown>