public GameContext() { Player = new Player(); Dealer= new Dealer(); Deck = new Deck(new SimpleDeckFiller()); BlackJackGame = new Game(Player, Dealer, Deck); }
public void ShouldNotAddCardsToHandWhenReachedScoreLimit() { var dealer = new Dealer(); dealer.TakeCard(new Card(CardRank.Queen,CardSuit.Club)); dealer.TakeCard(new Card(CardRank.Eight, CardSuit.Heart)); var currentScore = dealer.TotalScore; dealer.TakeCard(new Card(CardRank.Two,CardSuit.Spade)); Assert.AreEqual(currentScore,dealer.TotalScore); }
public Game(Player player, Dealer dealer, Deck deck) { _player = player; _dealer = dealer; _deck = deck; }