From 9ab2568b7519615165fa869c1852b0afbb4950e7 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 15 Mar 2016 14:51:34 +0100 Subject: Restore doc fixes and reformatting --- src/ch/epfl/xblast/server/Bonus.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ch/epfl/xblast/server/Bonus.java b/src/ch/epfl/xblast/server/Bonus.java index f22c9fe..80ca8a9 100644 --- a/src/ch/epfl/xblast/server/Bonus.java +++ b/src/ch/epfl/xblast/server/Bonus.java @@ -1,35 +1,36 @@ package ch.epfl.xblast.server; /** - * @author TimothéE FLOURE (257420) + * Bonuses. + * + * @author Pacien TRAN-GIRARD (261948) + * @author Timothée FLOURE (257420) */ public enum Bonus { /** - * Increase the maximum number of bombs used simultaneously. + * Increases the maximum number of bombs used simultaneously. */ INC_BOMB { @Override public Player applyTo(Player player) { - if (player.maxBombs() < BOMBS_LIMIT) { + if (player.maxBombs() < BOMBS_LIMIT) return player.withMaxBombs(player.maxBombs() + 1); - } else { + else return player.withMaxBombs(BOMBS_LIMIT); - } } }, /** - * Increase the range of the bombs. + * Increases the range of the bombs. */ INC_RANGE { @Override public Player applyTo(Player player) { - if (player.bombRange() < RANGE_LIMIT) { + if (player.bombRange() < RANGE_LIMIT) return player.withBombRange(player.bombRange() + 1); - } else { + else return player.withBombRange(RANGE_LIMIT); - } } }; @@ -50,4 +51,5 @@ public enum Bonus { * @return a new player with the modified values */ abstract public Player applyTo(Player player); + } -- cgit v1.2.3