Function aoc::year2018::day15::double_bfs

source ยท
fn double_bfs(
    walls: [u32; 32],
    units: &[Unit],
    point: Point,
    kind: Kind,
) -> Option<Point>
Expand description

Performs two BFS searches. The first search from the current unit finds the nearest target in reading order. The second reverse search from the target to the current unit, finds the correct direction to move.