Пример #1
0
        public void EnsureSuperDeckCardCount(string configurationName, int deckCount, int expectedCardCount)
        {
            configuration = CardConfigurationFactory.GetConfiguration(configurationName);

            SuperDeck deck = new SuperDeck(configuration, deckCount);

            Assert.Equal(expectedCardCount, deck.CardCount);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Stopwatch sw = new Stopwatch();

            sw.Start();
            SuperDeck deck = new SuperDeck(CardConfiguration.TraditionalJokers, 10000);

            while (deck.HasCards)
            {
                Card card = deck.Deal();
                System.Console.WriteLine(card.DisplayValue);
            }
            sw.Stop();

            System.Console.WriteLine($"{deck.DeckCount} decks");
            System.Console.WriteLine($"{deck.CardCount} cards");
            System.Console.WriteLine($"{sw.Elapsed} elapsed");
            System.Console.ReadLine();
        }