summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java4
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java4
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java4
-rw-r--r--src/test/java/org/luxons/sevenwonders/game/effects/EffectTest.java3
4 files changed, 7 insertions, 8 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;
}
diff --git a/src/test/java/org/luxons/sevenwonders/game/effects/EffectTest.java b/src/test/java/org/luxons/sevenwonders/game/effects/EffectTest.java
index 25dfcf38..8dee5a77 100644
--- a/src/test/java/org/luxons/sevenwonders/game/effects/EffectTest.java
+++ b/src/test/java/org/luxons/sevenwonders/game/effects/EffectTest.java
@@ -55,8 +55,7 @@ public class EffectTest {
@Test
public void testGoldIncrease() {
- GoldIncrease effect = new GoldIncrease();
- effect.setAmount(6);
+ GoldIncrease effect = new GoldIncrease(6);
effect.apply(board, leftBoard, rightBoard);
assertEquals(INITIAL_GOLD + 6, board.getGold());
assertEquals(INITIAL_GOLD, leftBoard.getGold());
bgstack15