예제 #1
0
        public bool Play(Shoe currentShoe, Hand currentHand, List <Hand> hands)
        {
            var splitOffCard = currentHand.Cards[0];

            var newHand = new Hand();

            newHand.AddCardToHand(splitOffCard);
            newHand.AddCardToHand(currentShoe.DealCard());
            newHand.Bet = currentHand.Bet;
            hands.Add(newHand);

            currentHand.Cards.Remove(splitOffCard);
            currentHand.AddCardToHand(currentShoe.DealCard());
            return(false);
        }
예제 #2
0
        public void DealCardRemovesOneCardFromDeck()
        {
            var shoe      = new Shoe(1);
            var cardDealt = shoe.DealCard();

            shoe.Cards.Count.Should().Be(51);
            shoe.Cards.Should().NotContain(cardDealt);
        }
예제 #3
0
 public void StartHand()
 {
     foreach (var person in players.Concat(new[] { dealer }))
     {
         person.hands = new List <Hand> {
             new Hand()
         };
     }
     while (dealer.hands[0].Cards.Count < 2)
     {
         foreach (var person in players.Concat(new[] { dealer }))
         {
             display.DisplayGame(this);
             person.hands[0].AddCardToHand(currentShoe.DealCard());
         }
     }
 }
예제 #4
0
 public bool Play(Shoe currentShoe, Hand currentHand, List <Hand> hands)
 {
     currentHand.AddCardToHand(currentShoe.DealCard());
     currentHand.Bet *= 2;
     return(true);
 }
예제 #5
0
 public bool Play(Shoe currentShoe, Hand currentHand, List <Hand> hands)
 {
     currentHand.AddCardToHand(currentShoe.DealCard());
     return(false);
 }