-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
92 lines (57 loc) · 2.05 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CollisionSimulation
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
int num = 75;
int x = 500;
int y = 500;
Particle[] particles = new Particle[num];
for (int i = 0; i < num; i++)
{
particles[i] = new Particle(x,y);
Console.WriteLine(particles[i]);
}
Console.WriteLine("=======================================================================");
CollisionSystem c = new CollisionSystem(particles, x, y);
//Particle a = new Particle(20, 20, 1, 1, 10, 5);
//Particle b = new Particle(22, 22, -1, -1, 10, 5);
//Console.WriteLine(a.timeToHit(b));
Application.Run(c);
//PriorityQueue pq = null;
//Random rand = new Random();
//Event[] initial = new Event[10];
//for (int i = 9; i >= 0; i--)
//{
// initial[9-i] = new Event((double)i);
//}
//pq = new PriorityQueue(initial);
////Event [] temp = pq.getPQCopy();
////for (int i = 0; i <= pq.getNumItems(); i++)
////{
//// Console.Write("inital:" + temp[i].time + ",\t"); //*******
////}
//Console.WriteLine("");
//pq.insertEvent(new Event(20.6));
//int a = pq.getNumItems();
//for (int i = 1; i <= a; i++)
//{
// double d = pq.delMin().time;
// Console.Write("Min: " + d + ",\t");
//}
//Console.WriteLine("----------------------------");
}
}
}