damage on stdin

This commit is contained in:
Wiktor Mazur
2019-08-08 21:40:45 +02:00
parent 66fad1f389
commit 6000a83838
4 changed files with 89 additions and 32 deletions
+4
View File
@@ -76,6 +76,10 @@ impl Player
pub fn get_damage_dealt(&self) -> f32 { self.damage_dealt }
pub fn get_time_elapsed(&self) -> f32 {
*self.time_elapsed.lock().unwrap()
}
pub fn get_dps(&self) -> f32 {
let elapsed = *self.time_elapsed.lock().unwrap();
if elapsed == 0.0 {