Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }