private void PrepareTracksFromStart() { var targets = map.Chests.Concat(new Point[] { map.Exit }).ToArray(); var tracesToTargets = BfsTask.FindPaths(map, map.InitialPosition, targets) .ToList(); tracksFromStartToChests = tracesToTargets.Where(x => { if (x.Value != map.Exit) { return(true); } trackFromStartToExit = x; return(false); }).ToList(); }
private void PrepareTracksFromExit() { tracksFromExitToChests = BfsTask.FindPaths(map, map.Exit, map.Chests) .ToList(); }