summaryrefslogtreecommitdiff
path: root/backend/src/main/java
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-09-29 01:18:23 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2017-09-29 01:18:23 +0200
commiteb35c4ddde39f737a0a5f1067bba4ad92eb5a65f (patch)
tree7b62f88f8378d4bae54afcc2c69c462047c45130 /backend/src/main/java
parentAllow empty types in checkstyle config (diff)
downloadseven-wonders-eb35c4ddde39f737a0a5f1067bba4ad92eb5a65f.tar.gz
seven-wonders-eb35c4ddde39f737a0a5f1067bba4ad92eb5a65f.tar.bz2
seven-wonders-eb35c4ddde39f737a0a5f1067bba4ad92eb5a65f.zip
Move to shared checkstyle config 2.1.0
Diffstat (limited to 'backend/src/main/java')
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/game/Settings.java4
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java8
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java8
-rw-r--r--backend/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java8
4 files changed, 15 insertions, 13 deletions
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/Settings.java b/backend/src/main/java/org/luxons/sevenwonders/game/Settings.java
index 7d292594..f05b0b01 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/game/Settings.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/game/Settings.java
@@ -78,7 +78,9 @@ public class Settings {
}
public WonderSide pickWonderSide() {
- return lastPickedSide = wonderSidePickMethod.pickSide(getRandom(), lastPickedSide);
+ WonderSide newSide = wonderSidePickMethod.pickSide(getRandom(), lastPickedSide);
+ lastPickedSide = newSide;
+ return newSide;
}
public int getLostPointsPerDefeat() {
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java b/backend/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java
index 1519e389..4c1215d4 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/game/effects/GoldIncrease.java
@@ -8,14 +8,14 @@ public class GoldIncrease extends InstantOwnBoardEffect {
private final int amount;
- public int getAmount() {
- return amount;
- }
-
public GoldIncrease(int amount) {
this.amount = amount;
}
+ public int getAmount() {
+ return amount;
+ }
+
@Override
public void apply(Board board) {
board.addGold(amount);
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java b/backend/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java
index 3accdd62..7da112f5 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java
@@ -8,14 +8,14 @@ public class MilitaryReinforcements extends InstantOwnBoardEffect {
private final int count;
- public int getCount() {
- return count;
- }
-
public MilitaryReinforcements(int count) {
this.count = count;
}
+ public int getCount() {
+ return count;
+ }
+
@Override
public void apply(Board board) {
board.getMilitary().addShields(count);
diff --git a/backend/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java b/backend/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java
index fce8fa3e..9a5d66ed 100644
--- a/backend/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java
+++ b/backend/src/main/java/org/luxons/sevenwonders/game/effects/RawPointsIncrease.java
@@ -8,14 +8,14 @@ public class RawPointsIncrease extends EndGameEffect {
private final int points;
- public int getPoints() {
- return points;
- }
-
public RawPointsIncrease(int points) {
this.points = points;
}
+ public int getPoints() {
+ return points;
+ }
+
@Override
public int computePoints(Table table, int playerIndex) {
return points;
bgstack15