Migrating From v0.3.X to v0.4.X
Grid::pathfinding, Grid::pathfinding_astar, Grid::pathfinding_coarse
Grid::pathfinding
now handles all algorithms and only takes a single argument: PathfindArgs
.
PathfindArgs
is a builder to reduce the number of arguments required to pass to the pathfinding method.
You will need to update any manual pathfinding calls to use PathfindArgs
#![allow(unused)] fn main() { let grid = grid.into_inner(); let (player, grid_pos, move_action) = player.into_inner(); // Request a start (grid_pos.0) to goal (move_action.0) using the AStar algorithm. let path = grid.pathfind( PathfindArgs::new(grid_pos.0, move_action.0).astar() ); }