aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ch/epfl/xblast/server/Bomb.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ch/epfl/xblast/server/Bomb.java b/src/ch/epfl/xblast/server/Bomb.java
index 38bd4c5..889dde0 100644
--- a/src/ch/epfl/xblast/server/Bomb.java
+++ b/src/ch/epfl/xblast/server/Bomb.java
@@ -11,6 +11,7 @@ import java.util.List;
11import java.util.ArrayList; 11import java.util.ArrayList;
12 12
13/** 13/**
14 * @author Pacien TRAN-GIRARD (261948)
14 * @author Timothée FLOURE (257420) 15 * @author Timothée FLOURE (257420)
15 */ 16 */
16public final class Bomb { 17public final class Bomb {
@@ -58,12 +59,7 @@ public final class Bomb {
58 * @throws NullPointerException if ownerId, position or fuseLengths is null 59 * @throws NullPointerException if ownerId, position or fuseLengths is null
59 */ 60 */
60 public Bomb(PlayerID ownerId, Cell position, int fuseLength, int range) { 61 public Bomb(PlayerID ownerId, Cell position, int fuseLength, int range) {
61 if (fuseLength == 0) { 62 this(ownerId, position, Sq.iterate(fuseLength, fl -> fl - 1 ), range);
62 throw new IllegalArgumentException();
63 } else {
64 fuseLengths = Sq.iterate(fuseLength, fuseLengths -> fuseLength - 1 );
65 }
66 this.Bomb(ownerId, position, fuseLengths, range);
67 } 63 }
68 64
69 /** 65 /**