/// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.TransparentBlack);

            //foreach (ModelMesh mesh in blueCube.Meshes)
            //{
            //    foreach(BasicEffect effect in mesh.Effects)
            //    {
            //        effect.AmbientLightColor = new Vector3(1.0f, 0, 0);
            //        effect.View = viewMatrix;
            //        effect.World = worldMatrix;
            //        effect.Projection = projectionMatrix;

            //    }
            //    mesh.Draw();
            //}

            // TODO: Add your drawing code here

            CubeManager.getCubeManager(this).Draw(gameTime);

            this.Window.Title = $"Pi Approximation: {Simulation.Pi}";

            base.Draw(gameTime);
        }
 public static CubeManager getCubeManager(Game game)
 {
     if (singleton == null)
     {
         singleton = new CubeManager(game);
     }
     return(singleton);
 }
 public Simulation(Game game, int seed)
 {
     rand    = new Random(seed);
     manager = CubeManager.getCubeManager(game);
 }