Bare minimum with renderer

This commit is contained in:
2022-04-29 13:58:45 +02:00
parent 404c5b91a7
commit 32f58b03cf
4 changed files with 70 additions and 9 deletions
+13 -3
View File
@@ -1,13 +1,13 @@
use console::Term;
mod human;
mod disease;
mod population;
mod prelude {
pub use crate::human::*;
pub use crate::disease::*;
pub use crate::population::*;
pub use rand::Rng;
pub use console::Term;
pub use console::style;
pub const CORRECTED_PERCENTAGE:i32 = 101;
}
@@ -17,4 +17,14 @@ fn main() {
let term = Term::stdout();
term.write_line("********** Rusty Propagation (Console) 2022 **********").expect("Oops Looks like we have a problem here...");
term.write_line("Press any key to start the propagation").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,30,30,disease);
println!("Before Filling");
population.display();
population.generate();
println!("After Filling");
population.display();
}