Crates.io | a-star_traitbased |
lib.rs | a-star_traitbased |
version | 0.1.3 |
source | src |
created_at | 2022-07-09 14:17:31.527524 |
updated_at | 2023-03-11 13:46:39.238923 |
description | Implemetaion of A* useful for stuct, based on train implementation |
homepage | https://github.com/Dah-phd/a-star_traitbased |
repository | https://github.com/Dah-phd/a-star_traitbased |
max_upload_size | |
id | 622540 |
size | 13,923 |
This is a barebone implementation of A* that uses a structure as a base. It can be vary useful if you have already a structure that includes movement, being a game, animation, or some form of structe that is alredy able to determine possilbe path.
Expected struct should work with 2D positional arguments (x, y), that are numeric. PathGenerator will requite the implementation of:
AStar::run takes a target that can have either both x and y (or exact point of arival) or only one (x or y), reaching a side of the map.
AStar::run returns Option for a Vector of position leading from the target back to the start or None if there is no path available.