diff options
author | Pacien TRAN-GIRARD | 2016-05-05 13:30:49 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2016-05-05 13:30:49 +0200 |
commit | ecbf78c67b5d0a4ce24f81a696ed1c6ebac1f831 (patch) | |
tree | 5384779dc4937c7080e878e1b57af5c2b87b7986 | |
parent | fda6f14fec0aaf774aeb4a6dd30da92209fadc7f (diff) | |
download | xblast-ecbf78c67b5d0a4ce24f81a696ed1c6ebac1f831.tar.gz |
Handle infinite bomb fuse length sequence explosion
-rw-r--r-- | src/ch/epfl/xblast/server/GameState.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java index 19b16a9..7c56153 100644 --- a/src/ch/epfl/xblast/server/GameState.java +++ b/src/ch/epfl/xblast/server/GameState.java | |||
@@ -377,7 +377,7 @@ public final class GameState { | |||
377 | */ | 377 | */ |
378 | private static List<Bomb> explodingBombs(List<Bomb> bombs, Set<Cell> blastedCells) { | 378 | private static List<Bomb> explodingBombs(List<Bomb> bombs, Set<Cell> blastedCells) { |
379 | return bombs.stream() | 379 | return bombs.stream() |
380 | .filter(b -> blastedCells.contains(b.position()) || b.fuseLength() <= 1) | 380 | .filter(b -> blastedCells.contains(b.position()) || b.fuseLengths().tail().isEmpty()) |
381 | .collect(Collectors.toList()); | 381 | .collect(Collectors.toList()); |
382 | } | 382 | } |
383 | 383 | ||