示例#1
0
        async Task IFinalRuleProcesses.SimplifyRulesAsync(CustomBasicList <int> thisList)
        {
            if (_gameContainer.SingleInfo !.CanSendMessage(_gameContainer.BasicData !))
            {
                await _gameContainer.Network !.SendAllAsync("simplifyrules", thisList);
            }
            DeckRegularDict <RuleCard> newList = new DeckRegularDict <RuleCard>();

            thisList.ForEach(index =>
            {
                newList.Add(_gameContainer.SaveRoot !.RuleList[index + 1]);
            });
            await newList.ForEachAsync(async thisRule =>
            {
                await _gameContainer.DiscardRuleAsync(thisRule);
            });

            if (thisList.Count > 0)
            {
                _gameContainer.RefreshRules();
            }
            _gameContainer !.CurrentAction = null;
            await _processes.AnalyzeQueAsync();
        }