diff options
Diffstat (limited to 'src/ch/epfl')
-rw-r--r-- | src/ch/epfl/xblast/server/Bomb.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ch/epfl/xblast/server/Bomb.java b/src/ch/epfl/xblast/server/Bomb.java index 659adb6..4b89752 100644 --- a/src/ch/epfl/xblast/server/Bomb.java +++ b/src/ch/epfl/xblast/server/Bomb.java | |||
@@ -42,11 +42,11 @@ public final class Bomb { | |||
42 | public Bomb(PlayerID ownerId, Cell position, Sq<Integer> fuseLengths, int range) { | 42 | public Bomb(PlayerID ownerId, Cell position, Sq<Integer> fuseLengths, int range) { |
43 | this.ownerId = Objects.requireNonNull(ownerId); | 43 | this.ownerId = Objects.requireNonNull(ownerId); |
44 | this.position = Objects.requireNonNull(position); | 44 | this.position = Objects.requireNonNull(position); |
45 | if (fuseLengths.isEmpty()) { | 45 | |
46 | this.fuseLengths = Objects.requireNonNull(fuseLengths); | ||
47 | if (this.fuseLengths.isEmpty()) | ||
46 | throw new IllegalArgumentException(); | 48 | throw new IllegalArgumentException(); |
47 | } else { | 49 | |
48 | this.fuseLengths = Objects.requireNonNull(fuseLengths); | ||
49 | } | ||
50 | this.range = ArgumentChecker.requireNonNegative(range); | 50 | this.range = ArgumentChecker.requireNonNegative(range); |
51 | } | 51 | } |
52 | 52 | ||