public override string SecondStar() { var input = ReadInput(); var result = HexagonPath.Furthest(input); return(result.ToString()); }
public override string FirstStar() { var input = ReadInput(); var result = HexagonPath.DistanceToDestination(input); return(result.ToString()); }
public void FirstStarPath(string directions, int shortestPath) { var destination = HexagonPath.Destination(directions); int path = (Math.Abs(destination.Y) - Math.Abs(destination.X)) / 2 + Math.Abs(destination.X); Assert.Equal(shortestPath, path); }
public void FirstStarOrientation() { var destination = HexagonPath.Destination("ne,ne,sw,sw"); Assert.Equal(new Point(0, 0), destination); }