Exemplo n.º 1
0
        void AddInitialCell(CPos location)
        {
            var estimatedCost = heuristic(location) * heuristicWeightPercentage / 100;

            Graph[location] = new CellInfo(CellStatus.Open, 0, estimatedCost, location);
            var connection = new GraphConnection(location, estimatedCost);

            openQueue.Add(connection);
        }
Exemplo n.º 2
0
        protected override void AddInitialCell(CPos location)
        {
            var cost = heuristic(location);

            Graph[location] = new CellInfo(CellStatus.Open, 0, cost, location);
            var connection = new GraphConnection(location, cost);

            OpenQueue.Add(connection);
            StartPoints.Add(connection);
        }
Exemplo n.º 3
0
        protected override void AddInitialCell(CPos location)
        {
            var cost = heuristic(location);

            Graph[location] = new CellInfo(0, cost, location, CellStatus.Open);
            var connection = new GraphConnection(location, cost);

            OpenQueue.Add(connection);
            StartPoints.Add(connection);
            considered.AddLast(new Pair <CPos, int>(location, 0));
        }