From ecbf78c67b5d0a4ce24f81a696ed1c6ebac1f831 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 5 May 2016 13:30:49 +0200 Subject: Handle infinite bomb fuse length sequence explosion --- src/ch/epfl/xblast/server/GameState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 { */ private static List explodingBombs(List bombs, Set blastedCells) { return bombs.stream() - .filter(b -> blastedCells.contains(b.position()) || b.fuseLength() <= 1) + .filter(b -> blastedCells.contains(b.position()) || b.fuseLengths().tail().isEmpty()) .collect(Collectors.toList()); } -- cgit v1.2.3