condor-for-games 0.4.0

Rust pathfinding library for grids, polygonal scenes, navmeshes, and replanning.
Documentation
//! Small caller-owned static grid search.
//!
//! This is the consumer-facing import shape after declaring the
//! `condor-for-games` package as the `condor` dependency with the `grid`
//! feature.

use condor::{AStar, Cell, Grid, Pathfinder, Point, SearchRequest};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut grid = Grid::new(5, 5)?;
    grid.set_cell(Point::new(2, 2), Cell::Blocked)?;
    let result = AStar.search(
        &grid,
        SearchRequest::new(Point::new(0, 0), Point::new(4, 4)),
    )?;
    println!(
        "found={} visited={}",
        result.is_found(),
        result.visited_nodes()
    );
    Ok(())
}