Bare minimum with renderer
This commit is contained in:
+13
-3
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user