diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ch/epfl/xblast/server/Player.java | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/ch/epfl/xblast/server/Player.java b/src/ch/epfl/xblast/server/Player.java index 57a280a..668b948 100644 --- a/src/ch/epfl/xblast/server/Player.java +++ b/src/ch/epfl/xblast/server/Player.java | |||
@@ -165,14 +165,11 @@ public final class Player { | |||
165 | * @throws NullPointerExeption | 165 | * @throws NullPointerExeption |
166 | */ | 166 | */ |
167 | public Player(PlayerID id, int lives, Cell position, int maxBombs, int bombRange) { | 167 | public Player(PlayerID id, int lives, Cell position, int maxBombs, int bombRange) { |
168 | this.id = Objects.requireNonNull(id); | ||
169 | DirectedPosition newDirectedPosition = new DirectedPosition(SubCell.centralSubCellOf(Objects.requireNonNull(position)), Direction.S); | 168 | DirectedPosition newDirectedPosition = new DirectedPosition(SubCell.centralSubCellOf(Objects.requireNonNull(position)), Direction.S); |
170 | DirectedPosition directedPositionSequence = DirectedPosition.stopped(newDirectedPos); | 169 | DirectedPosition directedPositionSequence = DirectedPosition.stopped(newDirectedPos); |
171 | LifeState invulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.INVULNERABLE); | 170 | LifeState invulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.INVULNERABLE); |
172 | LifeState vulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.VULNERABLE); | 171 | LifeState vulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.VULNERABLE); |
173 | Sq<LifeState> lifeStateSequence = Sq.repeat(Ticks.PLAYER_INVULNERABLE_TICKS,invulnerability).concat(Sq.constant(vulnerability)); | 172 | Sq<LifeState> lifeStateSequence = Sq.repeat(Ticks.PLAYER_INVULNERABLE_TICKS,invulnerability).concat(Sq.constant(vulnerability)); |
174 | this.maxBombs = ArgumentChecker.requireNonNegative(maxBombs); | ||
175 | this.bombRange = ArgumentChecker.requireNonNegative(bombRange); | ||
176 | this.Player(id, lifeStateSequence,directedPositionSequence, maxBombs, bombRange); | 173 | this.Player(id, lifeStateSequence,directedPositionSequence, maxBombs, bombRange); |
177 | } | 174 | } |
178 | 175 | ||