docs: function StateEngine() {
    // A record of all states that this state engine can take on.
    this.allowedStates = {};
  
    // Set up the undefined state, and set it as the current state.
    this.undefinedState = new UndefinedState();
    this.allowedStates[this.undefinedState.key()] = this.undefinedState;
    this.currentState = this.undefinedState;
  }