mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 12:25:10 -08:00
slight tweak to allow close to fixed to be fixed
This commit is contained in:
@@ -85,7 +85,7 @@ impl Enterprise {
|
||||
|
||||
pub fn repair_system(&mut self, system: &str, amount: f32) -> bool {
|
||||
let existing_damage = self.damaged[system];
|
||||
if existing_damage + amount >= 0.0 {
|
||||
if existing_damage + amount >= -0.1 {
|
||||
self.damaged.remove(system);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user