diff --git a/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java b/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java index c25567e..42952df 100644 --- a/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java +++ b/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java @@ -78,4 +78,8 @@ public abstract class AbstractPlayer implements Player { public void decrementEnergy(int energy){ this.energy -= energy; } + + public void incrementEnergy(int energy){ + this.energy += energy; + } } diff --git a/server/src/main/java/fr/lnl/game/server/games/player/Player.java b/server/src/main/java/fr/lnl/game/server/games/player/Player.java index bbfffcc..ea0ad36 100644 --- a/server/src/main/java/fr/lnl/game/server/games/player/Player.java +++ b/server/src/main/java/fr/lnl/game/server/games/player/Player.java @@ -19,4 +19,5 @@ public interface Player { ClassPlayer getClassPlayer(); void setPoint(Point point); void decrementEnergy(int energy); + void incrementEnergy(int energy); }