Dominion.DebugGameLog.WriteAllCards C# (CSharp) Method

WriteAllCards() private method

private WriteAllCards ( IEnumerable enumerable ) : void
enumerable IEnumerable
return void
        private void WriteAllCards(IEnumerable<Card> enumerable)
        {
            Card[] allCards = enumerable.ToArray<Card>();

            var cardComparer = new CompareCardByType();
            Array.Sort(allCards, cardComparer);

            for (int index = 0; index < allCards.Length; )
            {
                Card currentCard = allCards[index];
                int cardCount = 0;
                do
                {
                    cardCount++;
                    index++;
                } while (index < allCards.Length && cardComparer.Equals(currentCard, allCards[index]));

                this.textWriter.Write("{0}({1}), ", currentCard.name, cardCount);
            }
            this.textWriter.WriteLine();
        }

Same methods

DebugGameLog::WriteAllCards ( PlayerState playerState ) : void