flag rename

This commit is contained in:
Volodymyr Patuta 2020-11-08 14:22:27 +01:00
parent b24d023f1a
commit a91eefaf41
1 changed files with 4 additions and 4 deletions

View File

@ -241,15 +241,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.help("Generate random world"),
)
.arg(
Arg::with_name("gen-world")
.short("g")
.long("gen-world")
Arg::with_name("random")
.short("r")
.long("random")
.takes_value(false)
.help("Generate random world with 2 random robots"),
)
.get_matches();
let mut robot_pool: Vec<robot::Robot> = Vec::new();
let world = match matches.is_present("gen-world") {
let world = match matches.is_present("random") {
true => gen_world(&mut robot_pool),
false => {
let raw_conf = open_file(matches.value_of("file").unwrap_or("two_robots.txt"))?;