Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

RoundTrait

const RoundTrait: Trait<SchemaFor<MachineRecord<{ countdown: number; elapsed: number; lap: number; laps: number; reason: string; score: number; seconds: number; target: number; }, ValueIn<{ countdown: { on: { LOSE: Lost; }; wait: { seconds: (machineArgs) => number; then: Playing; }; }; lost: { }; playing: { on: { LOSE: Lost; WIN: Won; }; }; ready: { on: { LOSE: Lost; START: readonly [{ guard: (machineArgs) => boolean; target: Countdown; }, { target: Playing; }]; }; }; won: { }; }>>>> = RoundMachine.trait

A round of play on an entity of its own, which the Round component spawns: the round machine’s snapshot.