static void Main(string[] args) { int input = 277678; SpiralMemorySolver solver = new SpiralMemorySolver(input); Console.WriteLine(solver.SolveManhattanDistance()); Console.ReadLine(); }
public void SolveManhattanCornerDistanceTest() { SpiralMemorySolver solver = new SpiralMemorySolver(17); Assert.AreEqual(4, solver.SolveManhattanDistance()); }
public void SolveManhattanEdgeDistanceTest() { SpiralMemorySolver solver = new SpiralMemorySolver(18); Assert.AreEqual(3, solver.SolveManhattanDistance()); }
public void SolveManhattanZeroDistanceTest() { SpiralMemorySolver solver = new SpiralMemorySolver(1); Assert.AreEqual(0, solver.SolveManhattanDistance()); }