aboutsummaryrefslogtreecommitdiff
path: root/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch')
-rw-r--r--src/ch/epfl/xblast/server/GameState.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java
index 3495af1..36709e9 100644
--- a/src/ch/epfl/xblast/server/GameState.java
+++ b/src/ch/epfl/xblast/server/GameState.java
@@ -248,8 +248,7 @@ public final class GameState {
248 * @return the newly dropped bombs 248 * @return the newly dropped bombs
249 */ 249 */
250 private static List<Bomb> newlyDroppedBombs(List<Player> players0, Set<PlayerID> bombDropEvents, List<Bomb> bombs0) { 250 private static List<Bomb> newlyDroppedBombs(List<Player> players0, Set<PlayerID> bombDropEvents, List<Bomb> bombs0) {
251 Set<Cell> bombedCells = GameState.bombedCells(bombs0).keySet(); 251 HashSet<Cell> bombedCells = new HashSet<>(GameState.bombedCells(bombs0).keySet());
252
253 List<Bomb> bombs1 = new ArrayList<>(); 252 List<Bomb> bombs1 = new ArrayList<>();
254 253
255 for (Player p : GameState.alivePlayers(players0)) { 254 for (Player p : GameState.alivePlayers(players0)) {
@@ -511,7 +510,7 @@ public final class GameState {
511 private Set<PlayerID> discardConflictingBombDropEvents(Set<PlayerID> bombDropEvents) { 510 private Set<PlayerID> discardConflictingBombDropEvents(Set<PlayerID> bombDropEvents) {
512 Map<Cell, PlayerID> bombDropMap = this.mapTopPriorityPlayerCells( 511 Map<Cell, PlayerID> bombDropMap = this.mapTopPriorityPlayerCells(
513 this.alivePlayers().stream() 512 this.alivePlayers().stream()
514 .filter(bombDropEvents::contains) 513 .filter(p -> bombDropEvents.contains(p.id()))
515 .collect(Collectors.toList()) 514 .collect(Collectors.toList())
516 ); 515 );
517 516