diff options
author | Timothée Floure | 2016-03-07 15:29:35 +0100 |
---|---|---|
committer | Timothée Floure | 2016-03-07 15:29:35 +0100 |
commit | 1998636c6b0a3177da22760ef9ae19897f804bba (patch) | |
tree | 4436d35feef62885e1857a4ccf6939897860b504 /src/ch/epfl | |
parent | 0b7d819060a6e954d156e155c5329b2c3577f8d3 (diff) | |
download | xblast-1998636c6b0a3177da22760ef9ae19897f804bba.tar.gz |
Remove useless lines from the secondary builder of the Player class
Diffstat (limited to 'src/ch/epfl')
-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 | ||