mwg API
    Preparing search index...

    Interface EventPresentationOptions<State, Command, Event, A>

    interface EventPresentationOptions<
        State,
        Command,
        Event,
        A extends Roguelike.Actor,
    > {
        followUp?: (
            outcome: SimulationOutcome<State, Event>,
        ) => readonly Command[];
        play: (event: Event) => number | void;
        runtime: SimulationRuntime<State, Command, Event, A>;
    }

    Type Parameters

    Index
    followUp?: (outcome: SimulationOutcome<State, Event>) => readonly Command[]

    Commands a secondary actor should take once the batch that just resolved has finished presenting - a counter-attack, the next actor the scheduler calls. Receives the outcome that just resolved and returns whatever commands follow from it, in order; return an empty list (or omit the option) when nothing follows. A game reads the scheduler through its own closure to decide who is next.

    Must eventually return nothing: this is what chains a turn forward, so a function that always returns a command would spin forever.

    play: (event: Event) => number | void

    The game's own mapping from one event to what it looks like: a tween, a sound, a floating number. Returns how many seconds the next event should wait, the same contract PresentationQueue's own play has.

    the simulation whose commands this presents