code: public void changeState(Class<? extends State> next)
      {
          Check.notNull(next);
  
          final State from = current;
          if (current != null)
          {
              last = current.getClass();
              current.exit();
          }
          if (!states.containsKey(next))
          {
              final State state = create(next);
              states.put(next, state);
          }
          current = states.get(next);
          current.enter();
  
          listeners.forEach(l -> l.notifyStateTransition(from != null ? from.getClass() : null, next));
      }
docs: Change the current state.
  
  @param next The next state.
  @throws LionEngineException If <code>null</code> argument or unable to change state.