Skip to content

Instantly share code, notes, and snippets.

@petebarnett
petebarnett / sam.js
Created September 6, 2021 16:04
Implementation of State-Action-Model pattern
class Machine {
constructor(spec) {
this.acceptors = spec.acceptors;
this.actions = spec.actions;
this.sr = spec.state;
this.model = spec.model;
}