public void PrintResults()
        {
            if (strat.opVisibleDealerCard == -1)
            {
                Console.WriteLine("Overall Stats");
                Console.WriteLine("-------------");
                total.PrintResults();
                Console.WriteLine();
            }

            if (strat.opCountStats)
            {
                Console.WriteLine("Count Stats");
                Console.WriteLine("-----------");
                foreach (int count in countStats.Keys)
                {
                    StatisticsData stats = countStats[count];

                    Console.Write("Count = {0} || ", count);
                    stats.PrintResults(true);
                }
                Console.WriteLine();
            }

            if (strat.opVisDealerCardStats)
            {
                if (strat.opVisibleDealerCard == -1)
                {
                    Console.WriteLine("Dealer Card Stats");
                    Console.WriteLine("-----------------");
                    foreach (int count in cardValStats.Keys)
                    {
                        StatisticsData stats = cardValStats[count];

                        Console.Write("CardVal = {0} || ", count);
                        stats.PrintResults(true);
                    }
                    Console.WriteLine();
                }
                else
                {
                    StatisticsData stats = cardValStats[strat.opVisibleDealerCard];
                    Console.Write("CardVal = {0} || ", strat.opVisibleDealerCard);
                    stats.PrintResults(true);
                }
            }
        }
        public void Update(GameData res
                           , int DeckCount
                           , int DealerVisCardVal
                           , bool playerDoubleDown
                           , bool DealerBlackJack
                           , bool HasSplit
                           , double gameWager)
        {
            double winAmount = 0;

            if (!countStats.ContainsKey(DeckCount))
            {
                countStats.Add(DeckCount, new StatisticsData(strat));
            }
            StatisticsData countstats = countStats[DeckCount];

            if (!cardValStats.ContainsKey(DealerVisCardVal))
            {
                cardValStats.Add(DealerVisCardVal, new StatisticsData(strat));
            }
            StatisticsData dealercardstats = cardValStats[DealerVisCardVal];

            if (playerDoubleDown)
            {
                total.DoubleDown++;
                countstats.DoubleDown++;
                dealercardstats.DoubleDown++;
            }

            if (HasSplit)
            {
                total.Split++;
                countstats.Split++;
                dealercardstats.Split++;
            }

            if (res.blackJack)
            {
                total.BlackJack++;
                countstats.BlackJack++;
                dealercardstats.BlackJack++;
            }

            if (DealerBlackJack)
            {
                total.DealerBlackJack++;
                countstats.DealerBlackJack++;
                dealercardstats.DealerBlackJack++;
            }
            //////////////////////////////////
            ///Update the overall stats
            //////////////////////////////////
            if (res.gameResult == Statistics.Result.Loss)
            {
                total.Lost++;
                total.TotDeckCountAtLoss += DeckCount;

                countstats.Lost++;
                countstats.TotDeckCountAtLoss += DeckCount;

                dealercardstats.Lost++;
                dealercardstats.TotDeckCountAtLoss += DeckCount;

                winAmount -= gameWager;
            }
            if (res.gameResult == Statistics.Result.Win)
            {
                total.Win++;
                total.TotDeckCountAtWin += DeckCount;

                countstats.Win++;
                countstats.TotDeckCountAtWin += DeckCount;

                dealercardstats.Win++;
                dealercardstats.TotDeckCountAtWin += DeckCount;

                if (res.blackJack)
                {
                    winAmount += gameWager * 1.5;
                }
                else
                {
                    winAmount += gameWager;
                }
            }
            if (res.gameResult == Statistics.Result.Push)
            {
                total.Push++;
                countstats.Push++;
                dealercardstats.Push++;
            }

            total.Winnings           += winAmount;
            countstats.Winnings      += gameWager;
            dealercardstats.Winnings += gameWager;

            total.Purse           += winAmount;
            countstats.Purse      += gameWager;
            dealercardstats.Purse += gameWager;

            total.NumGames++;
            countstats.NumGames++;
            dealercardstats.NumGames++;
        }
 public Statistics(Strategy s)
 {
     strat = s;
     total = new StatisticsData(s);
 }