Skip to content

jacobtshirt/ts-astar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

ts-astar

A* Pathfinding with Typescript

Supports generics. Use YOUR object types and classes

const shortestPath = astar<T, V>(...)

T - a Position or Node/Location object. Must have a 'x' and 'y' property V - Represents information about the location can be any object or variable type given some constraints for each type

###Example

Using a grid or map

const shortestPath = astar<Node, string>(new Node(1,2), new Node(3,4), new Map<Node, string>().set(new Node(1,2), ' ').set(new Node(1,1), '#').set(new Node(3,4), 'X'));

About

A* pathfinding module for typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published