Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void FirstStarOrientation()
        {
            var destination = HexagonPath.Destination("ne,ne,sw,sw");

            Assert.Equal(new Point(0, 0), destination);
        }