You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
772 B

var BiAStarFinder = require('./BiAStarFinder');
/**
* Bi-directional Dijkstra path-finder.
* @constructor
* @extends BiAStarFinder
* @param {object} opt
* @param {boolean} opt.allowDiagonal Whether diagonal movement is allowed. Deprecated, use diagonalMovement instead.
* @param {boolean} opt.dontCrossCorners Disallow diagonal movement touching block corners. Deprecated, use diagonalMovement instead.
* @param {DiagonalMovement} opt.diagonalMovement Allowed diagonal movement.
*/
function BiDijkstraFinder(opt) {
BiAStarFinder.call(this, opt);
this.heuristic = function(dx, dy) {
return 0;
};
}
BiDijkstraFinder.prototype = new BiAStarFinder();
BiDijkstraFinder.prototype.constructor = BiDijkstraFinder;
module.exports = BiDijkstraFinder;

Powered by TurnKey Linux.