public void TestPathTranslate() { var result = Rectify.MakeRectangles(GridLatticeTestData.CornersLattice()); var pathfinder = new RectifyPathfinder(result, StandardLatticeParams); var resultPath = pathfinder.CalculatePath(new Position(3, 6), new Position(6, 4)); var resultPathAlt = pathfinder.CalculatePath(new Position(6, 4), new Position(3, 6)); //Due to changes in underlying code, this test is moot. }
public void TestLatticeCornerPathing() { var result = Rectify.MakeRectangles(GridLatticeTestData.CornersLattice()); Assert.AreEqual(14, result.Count, "Did not get 23 initial rectangles as expected"); var pathfinder = new RectifyPathfinder(result, StandardLatticeParams); var resultPath = pathfinder.CalculatePath(new Position(0, 0), new Position(1, 0)); Assert.AreEqual(2, resultPath.Count, "Did not find a path of 2 where expected"); Assert.AreEqual(new Position(0, 0), resultPath[0]); Assert.AreEqual(new Position(1, 0), resultPath[1]); }