summaryrefslogtreecommitdiff
path: root/backend/src/main/java/org/luxons
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/main/java/org/luxons')
-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