Always start at 0.

This commit is contained in:
2019-12-23 12:39:14 -08:00
parent 93eda30daa
commit e479b8ef62
5 changed files with 25 additions and 33 deletions

View File

@@ -57,12 +57,6 @@ impl Command {
)
.subcommand(SubCommand::with_name("compute")
.about("run the given computer")
.arg(Arg::with_name("START_POSITION")
.short("p")
.long("start-position")
.help("The starting position to execute from.")
.default_value("0")
.validator(is_number))
.arg(Arg::with_name("COMPUTER")
.index(1)
.help("The computer to run.")
@@ -140,9 +134,7 @@ impl Command {
}
if let Some(problem2) = matches.subcommand_matches("compute") {
let start_pos_str = problem2.value_of("START_POSITION").unwrap();
let start_pos = usize::from_str_radix(&start_pos_str, 10).unwrap();
let computer = Computer::load(problem2.value_of("COMPUTER").unwrap(), start_pos);
let computer = Computer::load(problem2.value_of("COMPUTER").unwrap());
return Command::RunComputer(computer);
}
@@ -179,7 +171,7 @@ impl Command {
}
if let Some(problem6) = matches.subcommand_matches("amplify") {
let computer = Computer::load(problem6.value_of("COMPUTER").unwrap(), 0);
let computer = Computer::load(problem6.value_of("COMPUTER").unwrap());
return Command::Amplify(computer);
}