diff options
Diffstat (limited to 'src/game.rs')
-rw-r--r-- | src/game.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/game.rs b/src/game.rs index 2158b8b..2a6aebb 100644 --- a/src/game.rs +++ b/src/game.rs @@ -319,11 +319,8 @@ impl GameBoard { fn simulate_bombs(&mut self, actions: [Action; 2]) { // NB: Damage radius has the cell distance rounded UP, throwing range has the cell distance rounded DOWN - // TODO: Destroy health packs - let map_clone = self.map.clone(); - // TODO: iter, filter_map, filter, filter_map... flatten this block down a smidge. for player_index in 0..actions.len() { if let Action::Bomb(p) = actions[player_index] { if self.map.at(p).is_some() { @@ -340,6 +337,7 @@ impl GameBoard { self.map.clear(target); self.players[player_index].moves_score += DIG_SCORE; } + self.powerups.retain(|powerup| powerup.position != target); let target_own_worm: Option<&mut Worm> = self.players[player_index] .worms |