aboutsummaryrefslogtreecommitdiff
path: root/src/ch
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-05-05 13:30:49 +0200
committerPacien TRAN-GIRARD2016-05-05 13:30:49 +0200
commitecbf78c67b5d0a4ce24f81a696ed1c6ebac1f831 (patch)
tree5384779dc4937c7080e878e1b57af5c2b87b7986 /src/ch
parentfda6f14fec0aaf774aeb4a6dd30da92209fadc7f (diff)
downloadxblast-ecbf78c67b5d0a4ce24f81a696ed1c6ebac1f831.tar.gz
Handle infinite bomb fuse length sequence explosion
Diffstat (limited to 'src/ch')
-rw-r--r--src/ch/epfl/xblast/server/GameState.java2
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