public void HandOutCards(DeckOfCards deck, AParticipant player) { for (int i = 0; i < 2; i++) { GiveCard(deck.GetOneCard(player), player); TakeCard(deck.GetOneCard(this)); } }
public void ResetDeckOfCardsTest() { var dealer = new Dealer(); var deck = new DeckOfCards(countDecksInOne); var changingDeck = new DeckOfCards(countDecksInOne); changingDeck.ShuffleDeck(); changingDeck.GetOneCard(dealer); changingDeck.GetOneCard(dealer); Assert.IsFalse(deck.Deck.Count() == changingDeck.Deck.Count()); changingDeck.ResetDeckOfCards(); Assert.IsTrue(deck.Deck.Count() == changingDeck.Deck.Count()); for (int i = 0; i < deck.Deck.Count(); i++) { Assert.IsTrue(CheckIsCardsEqual(deck.Deck[i], changingDeck.Deck[i])); } }
public void TakeCardTest() { var dealer = new Dealer(); var deck = new DeckOfCards(countDecksInOne); deck.ShuffleDeck(); ACard takenCard = deck.GetOneCard(dealer); Assert.IsTrue(deck.Deck.Count() == 51); Assert.IsFalse(CheckIsCardInDeck(deck, takenCard)); }