diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-10 11:22:23 +0100 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-10 11:22:48 +0100 |
commit | 2762309c42a15cbcbc9f04e3d91b7bcf9a6d9071 (patch) | |
tree | aa565679d6a23fa1376ad01bde26134a628c4db1 /src/main/java | |
parent | Make Effect an interface instead of abstract class (diff) | |
download | seven-wonders-2762309c42a15cbcbc9f04e3d91b7bcf9a6d9071.tar.gz seven-wonders-2762309c42a15cbcbc9f04e3d91b7bcf9a6d9071.tar.bz2 seven-wonders-2762309c42a15cbcbc9f04e3d91b7bcf9a6d9071.zip |
Simplify numeric effects creation
Diffstat (limited to 'src/main/java')
3 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java b/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java index 8e11073e..c2250d23 100644 --- a/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java +++ b/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java @@ -4,13 +4,13 @@ import org.luxons.sevenwonders.game.boards.Board; public class GoldIncrease extends InstantEffect { - private int amount; + private final int amount; public int getAmount() { return amount; } - public void setAmount(int amount) { + public GoldIncrease(int amount) { this.amount = amount; } diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java b/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java index 53569866..7cfa4905 100644 --- a/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java +++ b/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java @@ -4,13 +4,13 @@ import org.luxons.sevenwonders.game.boards.Board; public class MilitaryReinforcements extends InstantEffect { - private int count; + private final int count; public int getCount() { return count; } - public void setCount(int count) { + public MilitaryReinforcements(int count) { this.count = count; } diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java b/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java index 4238e891..53fcecd4 100644 --- a/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java +++ b/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java @@ -4,13 +4,13 @@ import org.luxons.sevenwonders.game.boards.Board; public class RawPointsIncrease extends EndGameEffect { - private int points; + private final int points; public int getPoints() { return points; } - public void setPoints(int points) { + public RawPointsIncrease(int points) { this.points = points; } |