示例#1
0
 public GameContext()
 {
     Player = new Player();
     Dealer= new Dealer();
     Deck = new Deck(new SimpleDeckFiller());
     BlackJackGame = new Game(Player, Dealer, Deck);
 }
示例#2
0
        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);
        }
示例#3
0
 public Game(Player player, Dealer dealer, Deck deck)
 {
     _player = player;
     _dealer = dealer;
     _deck = deck;
 }