Пример #1
0
        public void TexasGameDealToTheEnd()
        {
            //Arrange
            TexasGame texasGame = TexasGameHelper.Create();

            //Act
            DealToTheEnd(texasGame);

            //Assert
            Assert.AreEqual(2, texasGame.Players[0].Cards.Count);
            Assert.AreEqual(2, texasGame.Players[1].Cards.Count);
            Assert.AreEqual(5, texasGame.DoardCards.Count);
            Assert.AreEqual(52 - 12, texasGame.Deck.Cards.Count);
            Assert.AreEqual(0, texasGame.DealsLeft);
        }
Пример #2
0
        public void TexasGameDealFlop()
        {
            //Arrange
            TexasGame texasGame = TexasGameHelper.Create();

            //Act
            texasGame.Deal();
            texasGame.Deal();

            //Assert
            Assert.AreEqual(2, texasGame.Players[0].Cards.Count);
            Assert.AreEqual(2, texasGame.Players[1].Cards.Count);
            Assert.AreEqual(3, texasGame.DoardCards.Count);
            Assert.AreEqual(44, texasGame.Deck.Cards.Count);
            Assert.AreEqual(2, texasGame.DealsLeft);
        }
Пример #3
0
        public void TexasGameDealPlayerCardsAAToOnePlayer()
        {
            //Arrange
            TexasGame texasGame = TexasGameHelper.Create();

            texasGame.Players[0].AddCard(texasGame.Deck.PickCardFromDeck(new Card(Suits.Hearts, "A")));
            texasGame.Players[0].AddCard(texasGame.Deck.PickCardFromDeck(new Card(Suits.Dimensions, "A")));

            //Act
            texasGame.Deal();

            //Assert
            Assert.AreEqual(2, texasGame.Players.Count);
            Assert.AreEqual(2, texasGame.Players[0].Cards.Count);
            Assert.AreEqual(2, texasGame.Players[1].Cards.Count);
            Assert.AreEqual(48, texasGame.Deck.Cards.Count);
            Player player = texasGame.Players[0];

            Assert.AreEqual <int>(14, player.Cards[0].Value);
            Assert.AreEqual <int>(14, player.Cards[1].Value);
        }