public int GetDistance(List <char> route) { List <int> routeList = new List <int>(); route.ForEach(x => routeList.Add(char.ToUpper(x) - Offset)); return(_matrixDistanceCalculator.GetDistance(_routes, routeList)); }
public string TestGetDistance(string matrixRepresentation, int[] route) { int result = _matrixDistanceCalculator.GetDistance(_inputConverter.ConvertToMatrix(matrixRepresentation), route.ToList()); string returnVal = result.ToString(); if (result == -1) { returnVal = "NO SUCH ROUTE"; } return(returnVal); }