Пример #1
0
 public void Execute()
 {
     _timeService.AddTimedEvent(_typingRaceInstance.UpdateTypingSpeed);
     _timeService.AddTimedEvent(_typingRaceInstance.TrySetToGameOverState);
     _timeService.EnableEventDispatching();
     _timeService.RestartGameTimer();
 }
Пример #2
0
        public void Undo()
        {
            if (_timerWasRunning)
            {
                _timeService.StartGameTimer();
            }

            if (_eventDispatchingWasEnabled)
            {
                _timeService.EnableEventDispatching();
            }

            if (_previousState != null)
            {
                _typingRaceInstance.ChangeState(_previousState);
            }
        }