Esempio n. 1
0
        public void TestEmptyDeck(int id1, int id2)
        {
            var player = new Player(0, "PlayerTest", null);

            Card[] cards =
            {
                new Card("7", Suit.DIAMONDS, 0, id1),
                new Card("8", Suit.DIAMONDS, 0, id2)
            };
            foreach (var card in cards)
            {
                Assert.Equal(true, player.GetDeck().AddCard(card));
            }
            Assert.Equal(cards[0], player.GetDeck().GetCardById(id1));
            Assert.Equal(cards[1], player.GetDeck().GetCardById(id2));
            player.EmptyDeck();
            Assert.Equal(null, player.GetDeck().GetCardById(id1));
            Assert.Equal(null, player.GetDeck().GetCardById(id2));
        }