-
-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (31 loc) · 1022 Bytes
/
Program.cs
File metadata and controls
33 lines (31 loc) · 1022 Bytes
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
// submitted by Julian Schacher (jspp) with great help by gustorn
using System;
using System.Collections.Generic;
namespace JarvisMarch
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("JarvisMarch");
// Example list of points.
// The points are represented by vectors here, but that doesn't really matter.
var points = new List<Vector>()
{
new Vector(1, 3),
new Vector(2, 4),
new Vector(4, 0),
new Vector(1, 0),
new Vector(0, 2),
new Vector(2, 2),
new Vector(3, 4),
new Vector(3, 1),
};
var jarvisMarch = new JarvisMarch();
var giftWrap = jarvisMarch.Run(points);
// Print the points of the gift wrap.
foreach (var point in giftWrap)
System.Console.WriteLine($"{point.x}, {point.y}");
}
}
}