コード例 #1
0
            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();
            }
コード例 #2
0
 private void PrepareTracksFromExit()
 {
     tracksFromExitToChests = BfsTask.FindPaths(map, map.Exit, map.Chests)
                              .ToList();
 }