import { LoadedMachineConfiguration } from "../../src/types"; import { StateMachine } from "../../src/state-machines/state-machine"; export class VR_MOVE_STATE_MACHINE extends StateMachine { constructor(options: LoadedMachineConfiguration) { const { context } = options; super([ { "context": { "errorCounter": 0, ...context }, "id": "VR_MOVE", "initial": "ready", "states": { "GOAL": { "exit": [], "meta": { "CA": { "utterance": context.intro || "MOVE_TO" } }, "on": { "MOVE(target)": "POSITIVE_REINFORCEMENT", "TIMER_GOAL": "GOAL_REMINDER", "TIMER_TASK": "NEGATIVE_REINFORCEMENT" }, "type": "" }, "GOAL_REMINDER": { "exit": [], "meta": { "CA": { "utterance": "REMEMBER_GOAL" } }, "on": { "INSTANT": "GOAL" }, "type": "" }, "NEGATIVE_REINFORCEMENT": { "exit": [], "meta": { "CA": { "utterance": "NEGATIVE_REINFORCEMENT" }, "VR": [ { "name": "task_completed" }, { "name": "negative_reinforcement" } ] }, "on": { "INSTANT": "end" }, "type": "" }, "POSITIVE_REINFORCEMENT": { "exit": [], "meta": { "CA": { "utterance": "POSITIVE_REINFORCEMENT" }, "VR": [ { "name": "task_completed" }, { "name": "positive_reinforcement" } ] }, "on": { "INSTANT": "end" }, "type": "" }, "end": { "exit": [], "meta": { "VR": [ { "name": "task_completed" } ] }, "on": { "INSTANT": "end" }, "type": "final" }, "ready": { "exit": [], "meta": {}, "on": { "READY": "GOAL" }, "type": "" } } }, { actions: {}, guards: {} } ]); } }