From 2762309c42a15cbcbc9f04e3d91b7bcf9a6d9071 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sat, 10 Dec 2016 11:22:23 +0100 Subject: Simplify numeric effects creation --- src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java | 4 ++-- .../org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java | 4 ++-- .../java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main') 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; } -- cgit