pathfinding

Last updated:

0 purchases

pathfinding Image
pathfinding Images
Add to Cart

Description:

pathfinding

PathFinding.dart #
A Dart port of https://github.com/qiao/PathFinding.js library
Installing #
http://pub.dartlang.org/packages/pathfinding#installing
Usage: #
import 'package:pathfinding/finders/jps.dart';
import 'package:pathfinding/core/grid.dart';

main() {
var grid = new Grid(4, 4, [
[0, 0, 1, 1], // 0 - walkable, 1 - not walkable
[1, 0, 1, 1],
[1, 0, 1, 1],
[1, 0, 0, 0]
]);
var jps = new JumpPointFinder();
var path = jps.findPath(0, 0, 3, 3, grid);
print(path); // [[0, 0], [1, 1], [1, 2], [2, 3], [3, 3]]
}
copied to clipboard
Available finders: #

AStar
JumpPointFinder

TODO:

BreadthFirst
Dijkstra
BiBreadthFirst
BiDijkstra
BiAStarFinder
BestFirstFinder
BiBestFirstFinder

Benchmarks #
$ dart test benchmark/benchmarks.dart
00:05 +0: loading benchmark/benchmarks.dart
AStarFinder(RunTime): 41619.873239436616 us.
JumpPointFinder(RunTime): 7654.5874125874125 us.
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.