Ejemplo n.º 1
0
{ public static void Main()
  {
      System.Console.WriteLine("The ricochet ball program will begin now.");
      Ricochet_interface_form ricochet_application = new Ricochet_interface_form();

      Application.Run(ricochet_application);
      System.Console.WriteLine("This ricochet ball program has ended.  Bye.");
  } //End of Main function
Ejemplo n.º 2
0
{ public static void Main()
  {
      System.Console.WriteLine("The ricochet ball program will begin now.");
      System.Random           randomgeneratorv     = new System.Random();
      System.Random           randomgeneratorw     = new System.Random();
      double                  randomnumberv        = randomgeneratorv.NextDouble();
      double                  randomnumberw        = randomgeneratorw.NextDouble();
      double                  speed                = 50.0;
      Ricochet_interface_form ricochet_application = new Ricochet_interface_form(speed, randomnumberv, randomnumberw);

      Application.Run(ricochet_application);
      System.Console.WriteLine("This ricochet ball program has ended.  Bye.");
  }
Ejemplo n.º 3
0
{ public static void Main()
  {
      System.Console.WriteLine("The ricochet ball program will begin now.");
      //Declare the basic quantities needed for a straight line motion application: speed and direction.
      double speed = 200.0; //C# units, namely: pixels/sec.
      //Direction may be specified in either of two ways: (a) an angle number, or (b) a vector u⃗ = <v,w>
      //In this program we use the second choice.
      double angle   = (-45.0 * System.Math.PI) / 180;
      double angle_x = System.Math.Cos(angle);
      double angle_y = System.Math.Sin(angle);
      double v       = 17.2;
      double w       = 21.8;
      Ricochet_interface_form ricochet_application = new Ricochet_interface_form(speed, angle_x, angle_y);

      Application.Run(ricochet_application);
      System.Console.WriteLine("This ricochet ball program has ended.  Bye.");
  } //End of Main function
Ejemplo n.º 4
0
    public static void Main()
    {
        Ricochet_interface_form ricochet_application = new Ricochet_interface_form();

        Application.Run(ricochet_application);
    } //End of Main function