aboutsummaryrefslogtreecommitdiff
path: root/src/ch/epfl/xblast/server/GameState.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ch/epfl/xblast/server/GameState.java')
-rw-r--r--src/ch/epfl/xblast/server/GameState.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java
index 44fd5d1..abd07b3 100644
--- a/src/ch/epfl/xblast/server/GameState.java
+++ b/src/ch/epfl/xblast/server/GameState.java
@@ -52,7 +52,7 @@ public final class GameState {
52 * @param players list of the players 52 * @param players list of the players
53 */ 53 */
54 public GameState(Board board, List<Player> players) { 54 public GameState(Board board, List<Player> players) {
55 this(0, board, players, new ArrayList<>(), new ArrayList<>(), new ArrayList<>()); 55 this(0, board, players, Collections.emptyList(), Collections.emptyList(), Collections.emptyList());
56 } 56 }
57 57
58 /** 58 /**
@@ -72,11 +72,11 @@ public final class GameState {
72 this.board = Objects.requireNonNull(board); 72 this.board = Objects.requireNonNull(board);
73 73
74 if (players.size() != PlayerID.values().length) throw new IllegalArgumentException(); 74 if (players.size() != PlayerID.values().length) throw new IllegalArgumentException();
75 this.players = new ArrayList<>(players); 75 this.players = Lists.immutableList(players);
76 76
77 this.bombs = new ArrayList<>(Objects.requireNonNull(bombs)); 77 this.bombs = Lists.immutableList(Objects.requireNonNull(bombs));
78 this.explosions = new ArrayList<>(Objects.requireNonNull(explosions)); 78 this.explosions = Lists.immutableList(Objects.requireNonNull(explosions));
79 this.blasts = new ArrayList<>(Objects.requireNonNull(blasts)); 79 this.blasts = Lists.immutableList(Objects.requireNonNull(blasts));
80 } 80 }
81 81
82 /** 82 /**