public static IEnumerable <Card> DrawNextCards(this PackOfCards packOfCards, int count) { for (int i = 0; i < count; i++) { yield return(packOfCards.DrawNextCard()); } }
public void Setup() { var packOfCards = new PackOfCards(); this.numberOfCardsInOriginalPackOfCards = packOfCards.GetNumberOfAvailableCards(); this.stock = new Stock(packOfCards); }
public void When_drawing_cards_Cards_should_be_random() { var drawnCardsFromFirstPack = this.packOfCards.DrawNextCards(3); var secondPackOfCards = new PackOfCards(); var drawnCardsFromSecondPack = secondPackOfCards.DrawNextCards(3); drawnCardsFromFirstPack.Should().NotIntersectWith(drawnCardsFromSecondPack); }
static void Main() { var packOfCards = new PackOfCards(); Card randomCard; for (int i = 0; i < 53; i++) { randomCard = packOfCards.DrawNextCard(); if (randomCard.IsEmptyCard()) { Console.WriteLine("No cards available"); } else { Console.WriteLine(randomCard); } } Console.ReadLine(); }
public static IEnumerable <Card> DrawAllCards(this PackOfCards packOfCards) { return(packOfCards.DrawNextCards(52)); }
public void Setup() { packOfCards = new PackOfCards(); }
public BoardBuilder WithPackOfCards() { this.packOfCards = new PackOfCards(); return(this); }
public static IPackOfCards Create() { return(PackOfCards.Create()); }
public void Setup() { deck = (PackOfCards) new PackOfCardsCreator().Create(); }