示例#1
0
 public void EndGame()
 {
     _gameToken.Cancel();
     _needColor = null;
     OnChangeNeedColor?.Invoke(null);
     OnChangeActivePanelColor?.Invoke(null);
 }
示例#2
0
        public async void StartGame()
        {
            _needColor = _colorRepository.GetRandomColor();
            OnChangeNeedColor?.Invoke(_needColor);

            _gameToken = new CancellationTokenSource();
            await GameCycle(_gameToken.Token).ConfigureAwait(false);
        }