public void HandWithoutAcesShouldTotalNormal() { var hand = new Hand(); hand.Cards.Add(new Card(CardValue.Eight)); hand.Cards.Add(new Card(CardValue.Seven)); int val = hand.Evaluate(); Assert.AreEqual(15, val); }
public void AceShouldBeElevenIfWouldntBust() { var hand = new Hand(); hand.Cards.Add(new Card(CardValue.Ace)); hand.Cards.Add(new Card(CardValue.Eight)); int val = hand.Evaluate(); Assert.AreEqual(19, val); }
public void AdditionalAcesShouldEvaluateToOneIfWouldBust() { var hand = new Hand(); hand.Cards.Add(new Card(CardValue.Ace)); hand.Cards.Add(new Card(CardValue.Ace)); hand.Cards.Add(new Card(CardValue.Eight)); int val = hand.Evaluate(); Assert.AreEqual(20, val); }
public void AceShouldBeOneIfWouldBust() { var hand = new Hand(); hand.Cards.Add(new Card(CardValue.Ace)); hand.Cards.Add(new Card(CardValue.King)); hand.Cards.Add(new Card(CardValue.Jack)); int val = hand.Evaluate(); Assert.AreEqual(21, val); }