code: 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;
  }
docs: ----------------------------------------------------------- Class Definition ----------------------------------------------------------- 
  @class
  The superclass for state engine implementations.
  
  A state engine is a state machine with perhaps some extra functionality on
  the side to define state transitions, prune or modify results, etc.
  
  @param {Converter} converter
  A Converter instance, used to convert to and from State objects where
  appropriate.