Work on more references
This commit is contained in:
@@ -23,6 +23,9 @@ impl Player {
|
||||
pub fn change_life(&mut self, by: i16) {
|
||||
self.life = max(0, min(self.max_life, self.life + by));
|
||||
}
|
||||
pub fn get_life(&self) -> i16 {
|
||||
self.life
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user