Dominion.GameConfigBuilder.PopulateCardListToCount C# (CSharp) Method

PopulateCardListToCount() private static method

private static PopulateCardListToCount ( int targetCount, List list, UniqueCardPicker cardPicker, bool>.Func meetConstraint ) : void
targetCount int
list List
cardPicker UniqueCardPicker
meetConstraint bool>.Func
return void
        private static void PopulateCardListToCount(int targetCount, List<Card> list, UniqueCardPicker cardPicker, Func<Dominion.Card, bool> meetConstraint)
        {
            while (list.Count < targetCount)
            {
                Dominion.Card currentCard = cardPicker.GetCard(meetConstraint);
                if (currentCard == null)
                    break;
                list.Add(currentCard);
            }
        }