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); }
public void DealCardRemovesOneCardFromDeck() { var shoe = new Shoe(1); var cardDealt = shoe.DealCard(); shoe.Cards.Count.Should().Be(51); shoe.Cards.Should().NotContain(cardDealt); }
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()); } } }
public bool Play(Shoe currentShoe, Hand currentHand, List <Hand> hands) { currentHand.AddCardToHand(currentShoe.DealCard()); currentHand.Bet *= 2; return(true); }
public bool Play(Shoe currentShoe, Hand currentHand, List <Hand> hands) { currentHand.AddCardToHand(currentShoe.DealCard()); return(false); }