Example #1
0
        public void ExploreFromOutsideTheUpperBoundsOfYAndGetAnOutOfRangeException()
        {
            var world    = WorldBuilder.CreateStandardEmptyWorld();
            var explorer = new PathfinderEngine(world.Width, world.Height, new BooleanMapCostCalculator(world), new EmptyHeuristicCalculator());

            explorer.ExploreFrom(new Coordinate(0, world.Height));
        }
Example #2
0
        private void PerformExplore(PathfinderEngine pathfinder, Coordinate from)
        {
            _mapHost.ClearMap();

            _pathfinder = pathfinder;
            _pathfinder.ExploreFrom(from);

            RefreshWorkQueue();
        }
Example #3
0
        public void Execute(object parameter)
        {
            // Set Pins
            _mapHost.ShowBluePin(_from);
            _mapHost.ShowGreenPin(_to);

            // Setup
            var costCalculator = new BooleanMapCostCalculator(_world)
            {
                BlockPartialDiagonals = _blockPartialDiagonals
            };
            var heuristic  = new TargetedHeuristic(_to);
            var pathfinder = new PathfinderEngine(_world.Width, _world.Height, costCalculator, heuristic, _moveMode);

            _mapHost.ClearMap();

            pathfinder.ExploreFrom(_from);

            // TODO: Load Pathfinder into host
            // TODO: Reset WorkQueue
        }