aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ch/epfl/xblast/server/GameState.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java
index d648cef..77e91f2 100644
--- a/src/ch/epfl/xblast/server/GameState.java
+++ b/src/ch/epfl/xblast/server/GameState.java
@@ -232,13 +232,10 @@ public final class GameState {
232 * @return the next explosion state 232 * @return the next explosion state
233 */ 233 */
234 private static List<Sq<Sq<Cell>>> nextExplosions(List<Sq<Sq<Cell>>> explosions0) { 234 private static List<Sq<Sq<Cell>>> nextExplosions(List<Sq<Sq<Cell>>> explosions0) {
235 List<Sq<Sq<Cell>>> explosions1 = new ArrayList<>(); 235 return explosions0.stream()
236 for (Sq<Sq<Cell>> explosion : explosions0) { 236 .map(Sq::tail)
237 if (!explosion.tail().isEmpty()) { 237 .filter(s -> !s.isEmpty())
238 explosions1.add(explosion.tail()); 238 .collect(Collectors.toList());
239 }
240 }
241 return explosions1;
242 } 239 }
243 240
244 /** 241 /**