示例#1
0
        public void returnNullForPileWithKing()
        {
            Piles pile = new Piles();

            for (var i = 1; i <= 12; i++)
            {
                pile.addCardToPile(new Card((CardSuite)1, (CardValue)i), (PlayablePiles)0);
            }

            DiscardPile dp          = new DiscardPile();
            DiscardPile discardPile = pile.getPileWithAKing(dp);

            Assert.IsNull(discardPile);
            Assert.False(dp.DiscardedCards.Any());
        }
示例#2
0
        public void getDiscardPileWithAKing()
        {
            Piles pile = new Piles();

            for (var i = 1; i <= 13; i++)
            {
                pile.addCardToPile(new Card((CardSuite)1, (CardValue)i), (PlayablePiles)0);
            }

            DiscardPile dp          = new DiscardPile();
            DiscardPile discardPile = pile.getPileWithAKing(dp);

            Assert.IsNotNull(discardPile);
            Assert.AreEqual(13, discardPile.DiscardedCards.Count);
        }