configurable width & height

This commit is contained in:
2022-05-05 20:55:28 +02:00
parent b6d07d4d3c
commit 13fc7e9bd5

View File

@@ -23,6 +23,12 @@ struct Args {
/// Display stats after each propagation
#[clap(short, long)]
display: bool,
/// Width of humans grid in population
#[clap(short, long, default_value_t = 1000)]
width: i32,
/// Height of humans grid in population
#[clap(short, long, default_value_t = 1000)]
height: i32,
}
fn main() {
@@ -33,7 +39,7 @@ fn main() {
.expect("Oops Looks like we have a problem here...");
let disease = Disease::new(20, 10, 5, String::from("Covid 44"));
let mut population = Population::new(20, 10, 5, 1000, 1000, disease);
let mut population = Population::new(20,10,5,args.width,args.height,disease);
//population.change_disease(disease);
println!("After Filling");
//population.display();