public List <Log> ChartUntraceablePath(Galaxy galaxy) { try { var strategy = DecideStrategy(galaxy); switch (strategy) { case StrategyType.RowWise: case StrategyType.ColumnWise: case StrategyType.ThinRowWise: case StrategyType.ThinColumnWise: ChartStellarKnightPath(galaxy, strategy); break; case StrategyType.KobayashiMaru: // The only winning move is not to play. return(CaptainsLog.ToList()); case StrategyType.Undecided: default: throw new Exception($"Captain could not decide on strategy type. Galaxy dimensions: {galaxy.Columns}, {galaxy.Rows}"); } if (CaptainsLog.Distinct().Count() != CaptainsLog.Count) { throw new Exception("Retraced steps at some point - pylons found us!"); } return(CaptainsLog.OrderBy(log => log.StarDate).ToList()); } catch (Exception exception) { foreach (var sector in CaptainsLog.OrderBy(log => log.StarDate)) { Console.WriteLine(sector); } Console.WriteLine(exception); return(new List <Log>()); } }