reverse the Instructions vector, so he can behave as a queue
This commit is contained in:
parent
c7f0a0a281
commit
f2bfdeb28e
@ -172,7 +172,7 @@ fn parse_config(conf: String, pool: &mut Vec<robot::Robot>) -> Result<world::Wor
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Convert instructions line.
|
// 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) {
|
if !robot::is_instructions(&inst) {
|
||||||
return Err(String::from("Invalid instructions !"));
|
return Err(String::from("Invalid instructions !"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user