コード例 #1
0
        static void TestDrawUpToSixCards()
        {
            Deck     d  = new Deck();
            FoolHand fh = new FoolHand();

            fh.AddCard(d.Deal());
            fh.AddCard(d.Deal());

            Console.WriteLine("Test DrawUpToSixCards method");
            Console.WriteLine("Current Fool Hand.  Expecting 2 cards.\n" + fh);
            fh.DrawUpToSixCards(fh, d);
            Console.WriteLine("Drawing 4 more cards.  Expecting 6 cards in the hand:\n" + fh);
            Console.WriteLine("Total Cards left.  Expecting 46. " + d.NumCards);
        }