pub fn path_length(map: &Map) -> f32 {
    if map.starting_point.is_none() {
        return 0.0
    }
    
    match map.exit_point {
        None => 0.0,
        Some(exit) => {
            let dijkstra = DijkstraMap::new(map);
            dijkstra.tiles[map.xy_idx(exit.x, exit.y)]
        },
    }
}
/// Calculate the length of the shortes path from the starting point
/// to the exit.
/// If this path is very short, then the map is probably degenerated.
Calculate the length of the shortes path from the starting point
to the exit.
If this path is very short, then the map is probably degenerated.
Calculate the length of the shortes path from the starting point to the exit . If this path is very short then the map is probably degenerated .
pub fn path_length(map: &Map) -> f32 {
    if map.starting_point.is_none() {
        return 0.0
    }
    match map.exit_point {
        None => 0.0,
        Some(exit) => {
            let dijkstra = DijkstraMap::new(map);
            dijkstra.tiles[map.xy_idx(exit.x, exit.y)]
        },
    }
}
pub fn path_length ( map : & Map ) -> f32 { if map . starting_point . is_none ( ) { return 0.0 } match map . exit_point { None => 0.0 , Some ( exit ) => { let dijkstra = DijkstraMap :: new ( map ) ; dijkstra . tiles [ map . xy_idx ( exit . x , exit . y ) ] } , } }
Calculate the length of the shortes path from the starting point
to the exit.
Calculate the length of the shortes path from the starting point to the exit .
map
&Map
map
&Map