Merge branch 'master' into pest-rand-instr

This commit is contained in:
Volodymyr Patuta 2020-11-05 13:24:05 +01:00
commit ebdcbb97b0
1 changed files with 3 additions and 3 deletions

View File

@ -244,9 +244,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let raw_conf = open_file(matches.value_of("file").unwrap_or("two_robots.txt"))?; let raw_conf = open_file(matches.value_of("file").unwrap_or("two_robots.txt"))?;
let mut robot_pool: Vec<robot::Robot> = Vec::new(); let mut robot_pool: Vec<robot::Robot> = Vec::new();
let world: world::World = match matches.value_of("random-world") { let world: world::World = match matches.is_present("random-world") {
None => parse_config(raw_conf, &mut robot_pool)?, false => parse_config(raw_conf, &mut robot_pool)?,
Some(_) => world::random_world(), true => world::random_world(),
}; };
let mut hash: HashMap<robot::Position, u32> = HashMap::new(); let mut hash: HashMap<robot::Position, u32> = HashMap::new();