Merge branch 'reverse-vec' into 'master'

reverse the Instructions vector, so he can behave as a queue

See merge request mhart/DancingDroids!40
This commit is contained in:
Martin HART 2020-10-31 17:43:54 +01:00
commit 1744899f88
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ fn parse_config(conf: String, pool: &mut Vec<robot::Robot>) -> Result<world::Wor
};
// Convert instructions line.
let inst: Vec<char> = raw_inst.chars().collect();
let inst: Vec<char> = raw_inst.chars().rev().collect();
if !robot::is_instructions(&inst) {
return Err(String::from("Invalid instructions !"));
}