Esempio n. 1
0
        static void TestPickUpCardsTest()
        {
            Deck d = new Deck();

            d.Shuffle();
            Card     c   = d.DetermineTrump();
            FoolHand fh  = new FoolHand();
            FoolHand fh2 = new FoolHand();

            fh.DrawUpToSixCards(fh, d);
            fh2.DrawUpToSixCards(fh2, d);

            Console.WriteLine("Test PickupCards method");
            Console.WriteLine("Display a trump card: " + c);
            Console.WriteLine("Display FoolHand #1.  Expecting 6 cards:\n" + fh);
            Console.WriteLine("Display FoolHand #2.  Expecting 6 cards:\n" + fh2);

            fh2.PickUpCards(fh2, fh); //FoolHand #2 picking up cards
            Console.WriteLine("Display FoolHand #1.  Expecting 6 cards:\n" + fh);
            Console.WriteLine("Display FoolHand #2.  Expecting 12 cards:\n" + fh2);
            fh.DiscardAll();
            Console.WriteLine("Display FoolHand #1.  Expecting 0 cards after discrading all cards:\n" + fh.NumCards);
        }