public void Cards_ShouldReturnCorrectResult(Hand hand, Card[] cards) { foreach (var card in cards) { hand.AddCard(card); } Assert.Equal(cards, hand.Cards); }
public void GetValue_ShouldReturnCorrectResult_ForOneCard(Hand hand, Card card) { var expectedValue = BlackJack.CardValues[card.Rank]; if (card.Rank == Ace) { expectedValue += BlackJack.AceIncrement; } hand.AddCard(card); Assert.Equal(expectedValue, hand.GetValue()); }
public BitmapImage GetImageForCard(Card card) { return _cardsImage; }
public Rect GetViewboxForCard(Card card) { return _cardImagePositionProvider.GetCardRectangle(card).Normalize(_imageSize); }
public void AddCard(Card card) { if (card == null) throw new ArgumentNullException(nameof(card)); _cards.AddLast(card); }