From f8effdde28b9d92ce28b3ef5fbd3acf0644d2191 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Wed, 6 Apr 2016 22:51:52 +0200 Subject: Remove player number magic value --- src/ch/epfl/xblast/server/GameState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ch') diff --git a/src/ch/epfl/xblast/server/GameState.java b/src/ch/epfl/xblast/server/GameState.java index 77e91f2..c58a911 100644 --- a/src/ch/epfl/xblast/server/GameState.java +++ b/src/ch/epfl/xblast/server/GameState.java @@ -290,7 +290,7 @@ public final class GameState { this.ticks = ArgumentChecker.requireNonNegative(ticks); this.board = Objects.requireNonNull(board); - if (players.size() != 4) throw new IllegalArgumentException(); + if (players.size() != PlayerID.values().length) throw new IllegalArgumentException(); this.players = players; this.bombs = Objects.requireNonNull(bombs); -- cgit v1.2.3