コード例 #1
0
        public void CreateNewSet(IDeckDict <RegularRummyCard> thisCol, EnumWhatSets whatSet, bool useSecond)
        {
            _useSecond = useSecond;
            _setType   = whatSet;
            DeckRegularDict <RegularRummyCard> output;

            if (useSecond == true)
            {
                output = thisCol.OrderBy(items => items.SecondNumber).ToRegularDeckDict();
            }
            else
            {
                output = thisCol.OrderBy(items => items.Value).ToRegularDeckDict();
            }
            thisCol.ForEach(thisCard =>
            {
                thisCard.Player     = _gameContainer.WhoTurn;
                thisCard.Drew       = false;
                thisCard.IsSelected = false;
            });
            HandList.ReplaceRange(output);
        }
コード例 #2
0
 public void CreateNewMoon(IDeckDict <GalaxyCardGameCardInformation> thisCol, EnumWhatSets whatSet)
 {
     WhatSet = whatSet;
     if (WhatSet == 0)
     {
         throw new BasicBlankException("WhatSet cannot be 0 when creating a set");
     }
     thisCol = thisCol.OrderBy(items => items.Value).ToRegularDeckDict();
     thisCol.ForEach(thisCard =>
     {
         thisCard.Drew       = false;
         thisCard.IsSelected = false;
     });
     HandList.ReplaceRange(thisCol);
 }