[−][src]Function movingai::parser::parse_map_file
pub fn parse_map_file(path: &Path) -> Result<MovingAiMap>
Parse a MovingAI .map
file.
Arguments
path
represents the path to the file location.
Returns
It returns the parsed map as a MovingAiMap
or an Err
.
Panics
For the time, it panics if the map format it is not correct.
TODO: Catch all these errors and encode them into Result
.
Errors
Return errors if it is not possible to open the specified file.
Examples
use std::path::Path; use movingai::parser::parse_map_file; let map = parse_map_file(Path::new("./tests/arena.map")).unwrap();