public void EndGame() { _gameToken.Cancel(); _needColor = null; OnChangeNeedColor?.Invoke(null); OnChangeActivePanelColor?.Invoke(null); }
public async void StartGame() { _needColor = _colorRepository.GetRandomColor(); OnChangeNeedColor?.Invoke(_needColor); _gameToken = new CancellationTokenSource(); await GameCycle(_gameToken.Token).ConfigureAwait(false); }