public void verify_initial_hands_first_card_dealt_facedown() { Dealer dealer = new Dealer(); IPlayer player = new HumanPlayer(); Deck deck = new BlackJack.Deck(); ICard card0 = deck.PeekCard(0); ICard card1 = deck.PeekCard(1); ICard card2 = deck.PeekCard(2); ICard card3 = deck.PeekCard(3); ops.DealInitialHands(deck, dealer, player); ICard playerCard0 = player.GetHand().GetCards()[0]; ICard playerCard1 = player.GetHand().GetCards()[1]; ICard dealerCard0 = dealer.GetHand().GetCards()[0]; ICard dealerCard1 = dealer.GetHand().GetCards()[1]; Assert.IsFalse(playerCard0.Visible); Assert.IsFalse(dealerCard0.Visible); Assert.IsTrue(playerCard1.Visible); Assert.IsTrue(dealerCard1.Visible); }
public void verify_initial_hands_dealt_alternately() { Dealer dealer = new Dealer(); IPlayer player = new HumanPlayer(); Deck deck = new BlackJack.Deck(); ICard card0 = deck.PeekCard(0); ICard card1 = deck.PeekCard(1); ICard card2 = deck.PeekCard(2); ICard card3 = deck.PeekCard(3); ops.DealInitialHands(deck, dealer, player); ICard playerCard0 = player.GetHand().GetCards()[0]; ICard playerCard1 = player.GetHand().GetCards()[1]; ICard dealerCard0 = dealer.GetHand().GetCards()[0]; ICard dealerCard1 = dealer.GetHand().GetCards()[1]; Assert.IsTrue(card0.Equals(playerCard0)); Assert.IsTrue(card1.Equals(dealerCard0)); Assert.IsTrue(card2.Equals(playerCard1)); Assert.IsTrue(card3.Equals(dealerCard1)); }