anchor.diff:    void resumeState() {
       _currentSubscription.resume();
     }
  -
  +  */
   
   }
  
positive.code:     _stateMap = new Map<String, State>();
      _subscriptionMap = new Map<String, StreamSubscription>();
    }
  
    void addState(String name, State state) {
      state.game = _game;
      _stateMap[name] = state;
    }
  
    void addStateMap(Map<String, State> map) {
      map.forEach((_, state) {
        state.game = _game;
      });
      _stateMap.addAll(map);
    }
  
    void initState(String state) {
      _currentState = _stateMap[state];
      _currentSubscription = _currentState.listen(messageHandler, onDone:
          onDoneHandler);
      _subscriptionMap[_currentState.name] = _currentSubscription;
    }
  
    void messageHandler(message) {
      print("Message: $message");
      if (message == State.PAUSE) {
        new Future(_currentSubscription.pause).then(nextState);
      }
    }
  
    void onDoneHandler() {
      if (_currentState.nextState != null) {
        print("Next State");
        nextState(null);
      } else {
        print("The End");
      }
    }
  
    void nextState(_) {
      _currentState = _stateMap[_currentState.nextState];
  
      if (_subscriptionMap.containsKey(_currentState.name)) {
        _currentSubscription = _subscriptionMap[_currentState.name];
        if (_currentSubscription.isPaused) {
          _currentSubscription.resume();
        }
      } else {
        _currentSubscription = _currentState.listen(messageHandler, onDone:
            onDoneHandler);
        _subscriptionMap[_currentState.name] = _currentSubscription;
      }
  
    }
  
    void pauseState() {
      _currentSubscription.pause();
    }
  
negative.code: part of dartrocket;
  
  /**
   * StateManager controlls all of the statets and manage the flow of the game.
   * You only can use methodes with StateManager because all of the members are
   * private.
   * 
   * You only can and need to do 2 things with the statemanager:
   * * Add state(s)
   * * Start the first state
   * 
   * **Important:** The StateManager manage the flow of the game, 
   * but does not controll it. The Manager starts the next state based on the
   * current state's nextState value.
   * This means that you can change the flow of the game in the current State.
   * 
   * There are 2 events when the StateManager change the state:
   * * endState gets called from the current state
   * * terminateState gets called from the current state
   * If currentState.nextState's value is null then there will be no nextState and
   * it will be in a stateless state. Stage will turn to black.
   * 
   * You can see an example about usage at the [Game] class
   * */
  
  class StateManager {
  
    Game _game;
    
    // Stores the state in a map {state's name:state object}
    Map<String, State> _stateMap;
    
    //Stores the subscription's of the {state's name: state's subrisction} 
    Map<String, StreamSubscription> _subscriptionMap;
    
    State _currentState;
    StreamSubscription _currentSubscription;
  
  