Exemple #1
0
        public void CountCardsTest()
        {
            // I use Halves strategy of counting cards from wikipedia "Card counting" article
            byte[] cardArr = new byte[5] {
                1, 2, 3, 8, 10
            };
            double[] countOfCards = new double[5] {
                -1, 0.5, 1, 0, -1
            };
            Decks playingDecks = new Decks();

            for (int i = 0; i < 5; i++)
            {
                Assert.AreEqual(countOfCards[i], playingDecks.CountCards(cardArr[i]));
            }
        }