summaryrefslogtreecommitdiffstats
path: root/src/CS340.TSP/Coordinates.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CS340.TSP/Coordinates.cs')
-rw-r--r--src/CS340.TSP/Coordinates.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/CS340.TSP/Coordinates.cs b/src/CS340.TSP/Coordinates.cs
deleted file mode 100644
index 1e74021..0000000
--- a/src/CS340.TSP/Coordinates.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Collections.Generic;
-using System.IO;
-
-namespace TSP
-{
- public struct Coordinate
- {
- public int X { get; set; }
- public int Y { get; set; }
-
- public Coordinate(int x, int y)
- {
- X = x;
- Y = y;
- }
-
- public Coordinate(string coords)
- {
- string[] items = coords.Split(',');
- X = int.Parse(items[0]);
- Y = int.Parse(items[1]);
- }
-
-
-
- public static List<Coordinate> Parse(string file)
- {
- List<Coordinate> coordinates = new List<Coordinate>();
- foreach (string coords in File.ReadAllLines(file))
- coordinates.Add(new Coordinate(coords));
-
- return coordinates;
- }
-
-
- public override string ToString() => $"({X}, {Y})";
- }
-}