Work on more references

This commit is contained in:
2023-11-26 20:14:33 +01:00
parent 0ef034f14f
commit 227e44dd43
3 changed files with 13 additions and 5 deletions

View File

@@ -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]