forked from Maxluli/RustyPropagation
remove casts and correct 0 limit situation on roll()
This commit is contained in:
+5
-5
@@ -5,14 +5,14 @@
|
||||
|
||||
// #[derive(Debug)]
|
||||
pub struct Disease {
|
||||
pub infection_rate: u32,
|
||||
pub curing_rate: u32,
|
||||
pub death_rate: u32,
|
||||
pub traits: Vec<u32>,
|
||||
pub infection_rate: i32,
|
||||
pub curing_rate: i32,
|
||||
pub death_rate: i32,
|
||||
pub traits: Vec<i32>,
|
||||
pub name: String,
|
||||
}
|
||||
impl Disease {
|
||||
pub fn new(infection_r: u32, curing_r: u32, death_r: u32, the_name: String) -> Self {
|
||||
pub fn new(infection_r: i32, curing_r: i32, death_r: i32, the_name: String) -> Self {
|
||||
Self {
|
||||
infection_rate: infection_r,
|
||||
curing_rate: curing_r,
|
||||
|
||||
Reference in New Issue
Block a user