public void IndexToChar() { VaultGraph.FromIndex(VaultGraph.ToIndex('0')).ShouldBe('0'); VaultGraph.FromIndex(VaultGraph.ToIndex('9')).ShouldBe('9'); VaultGraph.FromIndex(VaultGraph.ToIndex('A')).ShouldBe('A'); VaultGraph.FromIndex(VaultGraph.ToIndex('Z')).ShouldBe('Z'); VaultGraph.FromIndex(VaultGraph.ToIndex('a')).ShouldBe('a'); VaultGraph.FromIndex(VaultGraph.ToIndex('z')).ShouldBe('z'); }
public static int FindMinimumSteps(char[,] grid, NPath render = null) { var graph = new VaultGraph(grid); if (render != null) { graph.Render(render); } return(graph.FindMinimumSteps()); }
public void CharToIndex() { var i0 = VaultGraph.ToIndex('0'); var i9 = VaultGraph.ToIndex('9'); var iA = VaultGraph.ToIndex('A'); var iZ = VaultGraph.ToIndex('Z'); var ia = VaultGraph.ToIndex('a'); var iz = VaultGraph.ToIndex('z'); i0.ShouldBe(0); i9.ShouldBe(iA - 1); iZ.ShouldBe(ia - 1); iz.ShouldBe(10 + 26 + 26 - 1); }