Skip to main content

parse_scenario

Function parse_scenario 

Source
pub fn parse_scenario(text: &str) -> Result<Vec<ScenarioEntry>, ParseError>
Expand description

Parses a Moving AI .scen file: a version line, then one entry per line with nine whitespace-separated fields (see ScenarioEntry). Empty lines are skipped.

ยงErrors

Returns a ParseError if the version line is missing, a line has the wrong number of fields or a field is not a number.