diff options
Diffstat (limited to 'src/main/java/org/luxons')
7 files changed, 36 insertions, 25 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/CardDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/CardDefinition.java index f469ca4f..621bed2c 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/CardDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/CardDefinition.java @@ -8,6 +8,7 @@ import org.luxons.sevenwonders.game.cards.Card; import org.luxons.sevenwonders.game.cards.Color; import org.luxons.sevenwonders.game.cards.Requirements; +@SuppressWarnings("unused") // the fields are injected by Gson public class CardDefinition implements Definition<Card> { private String name; diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.java index c95977f2..6f97e55f 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/DecksDefinition.java @@ -12,6 +12,7 @@ import org.luxons.sevenwonders.game.cards.Card; import org.luxons.sevenwonders.game.cards.CardBack; import org.luxons.sevenwonders.game.cards.Decks; +@SuppressWarnings("unused,MismatchedQueryAndUpdateOfCollection") // the fields are injected by Gson public class DecksDefinition implements Definition<Decks> { private List<CardDefinition> age1; diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java index d239318d..836fecc6 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/EffectsDefinition.java @@ -15,6 +15,7 @@ import org.luxons.sevenwonders.game.effects.ScienceProgress; import org.luxons.sevenwonders.game.effects.SpecialAction; import org.luxons.sevenwonders.game.effects.SpecialActionTrigger; +@SuppressWarnings("unused") // the fields are injected by Gson public class EffectsDefinition implements Definition<List<Effect>> { private GoldIncrease gold; diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.java index 2dfe7bb7..d44cccff 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderDefinition.java @@ -1,14 +1,11 @@ package org.luxons.sevenwonders.game.data.definitions; -import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import org.luxons.sevenwonders.game.Settings; -import org.luxons.sevenwonders.game.resources.ResourceType; import org.luxons.sevenwonders.game.wonders.Wonder; -import org.luxons.sevenwonders.game.wonders.WonderStage; +@SuppressWarnings("unused,MismatchedQueryAndUpdateOfCollection") // the fields are injected by Gson public class WonderDefinition implements Definition<Wonder> { private String name; @@ -27,24 +24,4 @@ public class WonderDefinition implements Definition<Wonder> { return wonder; } - public static class WonderSideDefinition { - - private ResourceType initialResource; - - private List<WonderStageDefinition> stages; - - private String image; - - ResourceType getInitialResource() { - return initialResource; - } - - List<WonderStage> createStages(Settings settings) { - return stages.stream().map(def -> def.create(settings)).collect(Collectors.toList()); - } - - String getImage() { - return image; - } - } } diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSide.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSide.java index 9cfeb767..08c85f57 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSide.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSide.java @@ -1,5 +1,5 @@ package org.luxons.sevenwonders.game.data.definitions; public enum WonderSide { - A, B; + A, B } diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSideDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSideDefinition.java new file mode 100644 index 00000000..9b2bc2d5 --- /dev/null +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderSideDefinition.java @@ -0,0 +1,30 @@ +package org.luxons.sevenwonders.game.data.definitions; + +import java.util.List; +import java.util.stream.Collectors; + +import org.luxons.sevenwonders.game.Settings; +import org.luxons.sevenwonders.game.resources.ResourceType; +import org.luxons.sevenwonders.game.wonders.WonderStage; + +@SuppressWarnings("unused,MismatchedQueryAndUpdateOfCollection") // the fields are injected by Gson +class WonderSideDefinition { + + private ResourceType initialResource; + + private List<WonderStageDefinition> stages; + + private String image; + + ResourceType getInitialResource() { + return initialResource; + } + + List<WonderStage> createStages(Settings settings) { + return stages.stream().map(def -> def.create(settings)).collect(Collectors.toList()); + } + + String getImage() { + return image; + } +} diff --git a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java index 7a866e05..887b414a 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/definitions/WonderStageDefinition.java @@ -4,6 +4,7 @@ import org.luxons.sevenwonders.game.Settings; import org.luxons.sevenwonders.game.cards.Requirements; import org.luxons.sevenwonders.game.wonders.WonderStage; +@SuppressWarnings("unused") // the fields are injected by Gson public class WonderStageDefinition implements Definition<WonderStage> { private Requirements requirements; |