A* (A star) pathfinding algorithm implementation in Swift 5.0 (Playground included) using protocol oriented programming.
Add pathfinding to your graph just by implementing the 3 requirements of the GraphNode protocol.
- To try the playground open: AStar.xcodeproj
- Build the framework (
- Click on Playground.playground
Swift Package Manager
You can now add this package to your project using SPM
Xcode 11 has a new interface to include packages into your existing projects.
Add Package Dependency...
- Search for
AStarand select this repository.
- Follow the on screen instructions
Manualy editing package file
To include it in your package manually, add the following dependency to your
.package(url: "https://github.com/Dev1an/A-Star.git", .branch("master"))
import AStar to access the APIs.