Exemplo n.º 1
0
        public void BlackJackPass()
        {
            BlackJackController blackJack = new BlackJackController(1);
            Deck deck       = new Deck();
            Deck playerHand = new Deck(true);

            Card AceSpade  = new Card(Suit.SPADES, Face.ACE);
            Card KingSpade = new Card(Suit.SPADES, Face.KING);

            playerHand.Return(AceSpade);
            playerHand.Return(KingSpade);

            bool isBlackjack = blackJack.BlackJack(playerHand);

            Assert.IsTrue(isBlackjack);
        }
Exemplo n.º 2
0
        public void BlackJackFail()
        {
            BlackJackController blackJack = new BlackJackController(1);
            Deck deck       = new Deck();
            Deck playerHand = new Deck(true);

            Card AceSpade  = new Card(Suit.SPADES, Face.ACE);
            Card KingSpade = new Card(Suit.SPADES, Face.KING);
            Card TenHeart  = new Card(Suit.HEARTS, Face.TEN);

            playerHand.Return(AceSpade);
            playerHand.Return(KingSpade);
            playerHand.Return(TenHeart);

            bool isBlackjack = blackJack.BlackJack(playerHand);

            Assert.IsFalse(isBlackjack);
        }