diff options
Diffstat (limited to 'src/game.rs')
-rw-r--r-- | src/game.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game.rs b/src/game.rs index 3eb7b11..fca740d 100644 --- a/src/game.rs +++ b/src/game.rs @@ -187,7 +187,7 @@ impl GameBoard { self.simulate_select(moves); let actions = self.identify_actions(moves); - // TODO: Simulate frozen worms (nullify their actions) + self.simulate_moves(actions); self.simulate_digs(actions); self.simulate_bombs(actions); @@ -225,7 +225,12 @@ impl GameBoard { } fn simulate_tick_frozen_timers(&mut self) { - // TODO + self.players + .iter_mut() + .flat_map(|p| p.worms.iter_mut()) + .for_each(|ref mut w| { + w.rounds_until_unfrozen = w.rounds_until_unfrozen.saturating_sub(1) + }); } fn identify_actions(&self, moves: [Command; 2]) -> [Action; 2] { |