public void Execute() { _timeService.AddTimedEvent(_typingRaceInstance.UpdateTypingSpeed); _timeService.AddTimedEvent(_typingRaceInstance.TrySetToGameOverState); _timeService.EnableEventDispatching(); _timeService.RestartGameTimer(); }
public void Undo() { if (_timerWasRunning) { _timeService.StartGameTimer(); } if (_eventDispatchingWasEnabled) { _timeService.EnableEventDispatching(); } if (_previousState != null) { _typingRaceInstance.ChangeState(_previousState); } }