public static void Main(string[] args)
        {
            MonteCarlo sim = new MonteCarlo(10000);

            Console.WriteLine("Pi is approximated to be {0} based on a simulation of {1} points",
                              sim.Simulate(), sim.totalPoints);

            // pause so results can be viewed
            Console.WriteLine("Press Any Key To Exit");
            Console.ReadKey();
        }
        public void RunSimulation(int numOfResults, int simIntensity)
        {
            List <MonteCarloResult> sims = new List <MonteCarloResult>();

            MonteCarlo sim = new MonteCarlo(simIntensity);

            for (int i = 0; i < numOfResults; i++)
            {
                sim.Simulate();

                //add results results list
                sims.Add(new MonteCarloResult()
                {
                    Pi     = sim.PiApproximation,
                    Hits   = sim.PointsInCircle,
                    Misses = sim.TotalPoints - sim.PointsInCircle
                });
            }

            results.ItemsSource = sims;
        }