forked from Maxluli/RustyPropagation
configurable width & height
This commit is contained in:
+7
-1
@@ -23,6 +23,12 @@ struct Args {
|
|||||||
/// Display stats after each propagation
|
/// Display stats after each propagation
|
||||||
#[clap(short, long)]
|
#[clap(short, long)]
|
||||||
display: bool,
|
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() {
|
fn main() {
|
||||||
@@ -33,7 +39,7 @@ fn main() {
|
|||||||
.expect("Oops Looks like we have a problem here...");
|
.expect("Oops Looks like we have a problem here...");
|
||||||
|
|
||||||
let disease = Disease::new(20, 10, 5, String::from("Covid 44"));
|
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);
|
//population.change_disease(disease);
|
||||||
println!("After Filling");
|
println!("After Filling");
|
||||||
//population.display();
|
//population.display();
|
||||||
|
|||||||
Reference in New Issue
Block a user