diff options
Diffstat (limited to 'src/ch')
-rw-r--r-- | src/ch/epfl/xblast/server/GameState.java | 8 | ||||
-rw-r--r-- | src/ch/epfl/xblast/server/Ticks.java | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java index 288aeb8..e75da1d 100644 --- a/src/ch/epfl/xblast/server/GameState.java +++ b/src/ch/epfl/xblast/server/GameState.java | |||
@@ -103,11 +103,13 @@ public final class GameState { | |||
103 | private static List<Sq<Cell>> nextBlasts(List<Sq<Cell>> blasts0, Board board0, List<Sq<Sq<Cell>>> explosions0) { | 103 | private static List<Sq<Cell>> nextBlasts(List<Sq<Cell>> blasts0, Board board0, List<Sq<Sq<Cell>>> explosions0) { |
104 | return Stream.concat( | 104 | return Stream.concat( |
105 | blasts0.stream() | 105 | blasts0.stream() |
106 | .filter(blastSeq -> !blastSeq.tail().isEmpty()) | 106 | .filter(b -> !b.tail().isEmpty()) |
107 | .filter(blastSeq -> board0.blockAt(blastSeq.head()).isFree()) | 107 | .filter(b -> board0.blockAt(b.head()).isFree()) |
108 | .map(Sq::tail), | 108 | .map(Sq::tail), |
109 | explosions0.stream() | 109 | explosions0.stream() |
110 | .map(Sq::head)) | 110 | .filter(e -> !e.isEmpty()) |
111 | .map(Sq::head) | ||
112 | .filter(b -> !b.isEmpty())) | ||
111 | .collect(Collectors.toList()); | 113 | .collect(Collectors.toList()); |
112 | } | 114 | } |
113 | 115 | ||
diff --git a/src/ch/epfl/xblast/server/Ticks.java b/src/ch/epfl/xblast/server/Ticks.java index b880dd7..a4c3e74 100644 --- a/src/ch/epfl/xblast/server/Ticks.java +++ b/src/ch/epfl/xblast/server/Ticks.java | |||
@@ -34,7 +34,6 @@ public interface Ticks { | |||
34 | * Duration of crumbling of a wall (in ticks). | 34 | * Duration of crumbling of a wall (in ticks). |
35 | */ | 35 | */ |
36 | int WALL_CRUMBLING_TICKS = EXPLOSION_TICKS; | 36 | int WALL_CRUMBLING_TICKS = EXPLOSION_TICKS; |
37 | |||
38 | /** | 37 | /** |
39 | * Duration of the presence of a bonus (in ticks). | 38 | * Duration of the presence of a bonus (in ticks). |
40 | */ | 39 | */ |