private void AddBallBtn_Click(object sender, EventArgs e)
        {
            BouncingBall ball = new BouncingBall(this.ClientSize.Width, this.ClientSize.Height);

            bouncingBalls.Add(ball);
            this.Paint += new PaintEventHandler(ball.PaintBall);
        }
示例#2
0
        static void Main(string[] args)
        {
            // BouncingBall ball = new BouncingBall();
            double result = BouncingBall.bouncingBall(3.00, 0.66, 1.50);

            Console.WriteLine("Mother has seen the ball " + result + " times.");
            // Close the console window
            Console.ReadKey();
        }
示例#3
0
 static void Main()
 {
     using (var game = new BouncingBall())
         game.Run();
 }
示例#4
0
 static void Main(string[] args)
 {
     BouncingBall.bouncingBall(3.0, 0.66, 1.5);
     BouncingBall.bouncingBall(30.0, 0.66, 1.5);
 }