summaryrefslogtreecommitdiff
path: root/src/main/java/org/luxons
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2016-12-25 15:00:28 +0100
committerjbion <joffrey.bion@amadeus.com>2016-12-25 15:00:28 +0100
commit00632a9f9e23bb24d03359e70472686e22aacd18 (patch)
treea9b709a89cc42697938e206170f39faa1ba4617c /src/main/java/org/luxons
parentExtract military stuff into its own object (diff)
downloadseven-wonders-00632a9f9e23bb24d03359e70472686e22aacd18.tar.gz
seven-wonders-00632a9f9e23bb24d03359e70472686e22aacd18.tar.bz2
seven-wonders-00632a9f9e23bb24d03359e70472686e22aacd18.zip
Make use of addGold instead of setGold when possible
Diffstat (limited to 'src/main/java/org/luxons')
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/api/Table.java2
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/api/Table.java b/src/main/java/org/luxons/sevenwonders/game/api/Table.java
index 518f20c6..87187a75 100644
--- a/src/main/java/org/luxons/sevenwonders/game/api/Table.java
+++ b/src/main/java/org/luxons/sevenwonders/game/api/Table.java
@@ -70,6 +70,6 @@ public class Table {
public void giveGoldForDiscarded(int playerIndex, int goldBonus) {
Board board = boards.get(playerIndex);
- board.setGold(board.getGold() + goldBonus);
+ board.addGold(goldBonus);
}
}
diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java b/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
index 05794702..e9f9fe5f 100644
--- a/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
+++ b/src/main/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElement.java
@@ -65,7 +65,7 @@ public class BonusPerBoardElement implements Effect {
public void apply(Table table, int playerIndex) {
int goldGain = gold * computeNbOfMatchingElementsIn(table, playerIndex);
Board board = table.getBoard(playerIndex);
- board.setGold(board.getGold() + goldGain);
+ board.addGold(goldGain);
}
@Override
bgstack15