コード例 #1
0
        public void Test_HandIsValid()
        {
            Deck deck = new Deck();

            Card[] testCards = new Card[5];
            testCards[0] = new Card("AS");
            testCards[1] = new Card("KC");
            testCards[2] = new Card("QD");
            testCards[3] = new Card("JH");
            testCards[4] = new Card("10S");
            //testCards[5] = new Card("9H");

            Hand hand = new Hand();

            Assert.IsFalse(hand.IsValid(deck));

            hand = new Hand(testCards);

            Assert.IsTrue(hand.IsValid(deck));

            hand.DrawCards(deck);

            Assert.IsFalse(hand.IsValid(deck));
        }