diff options
Diffstat (limited to 'game-engine/src/main/java')
2 files changed, 8 insertions, 14 deletions
diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java index 887b414a..230484ee 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java @@ -13,9 +13,6 @@ public class WonderStageDefinition implements Definition<WonderStage> { @Override public WonderStage create(Settings settings) { - WonderStage stage = new WonderStage(); - stage.setRequirements(requirements); - stage.setEffects(effects.create(settings)); - return stage; + return new WonderStage(requirements, effects.create(settings)); } } diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java index 5f6765ee..89b20383 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/wonders/WonderStage.java @@ -11,28 +11,25 @@ import org.luxons.sevenwonders.game.resources.BoughtResources; public class WonderStage { - private Requirements requirements; + private final Requirements requirements; - private List<Effect> effects; + private final List<Effect> effects; private CardBack cardBack; - public Requirements getRequirements() { - return requirements; + public WonderStage(Requirements requirements, List<Effect> effects) { + this.requirements = requirements; + this.effects = effects; } - public void setRequirements(Requirements requirements) { - this.requirements = requirements; + public Requirements getRequirements() { + return requirements; } public List<Effect> getEffects() { return effects; } - public void setEffects(List<Effect> effects) { - this.effects = effects; - } - public CardBack getCardBack() { return cardBack; } |