From 1998636c6b0a3177da22760ef9ae19897f804bba Mon Sep 17 00:00:00 2001 From: Timothée Floure Date: Mon, 7 Mar 2016 15:29:35 +0100 Subject: Remove useless lines from the secondary builder of the Player class --- src/ch/epfl/xblast/server/Player.java | 3 --- 1 file changed, 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 { * @throws NullPointerExeption */ public Player(PlayerID id, int lives, Cell position, int maxBombs, int bombRange) { - this.id = Objects.requireNonNull(id); DirectedPosition newDirectedPosition = new DirectedPosition(SubCell.centralSubCellOf(Objects.requireNonNull(position)), Direction.S); DirectedPosition directedPositionSequence = DirectedPosition.stopped(newDirectedPos); LifeState invulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.INVULNERABLE); LifeState vulnerability = new LifeState(ArgumentChecker.requireNonNegative(lives), LifeState.State.VULNERABLE); Sq lifeStateSequence = Sq.repeat(Ticks.PLAYER_INVULNERABLE_TICKS,invulnerability).concat(Sq.constant(vulnerability)); - this.maxBombs = ArgumentChecker.requireNonNegative(maxBombs); - this.bombRange = ArgumentChecker.requireNonNegative(bombRange); this.Player(id, lifeStateSequence,directedPositionSequence, maxBombs, bombRange); } -- cgit v1.2.3