diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-10 08:32:17 +0100 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2016-12-10 08:32:17 +0100 |
commit | f7202edf8f94afba898646ea8ed2fe759b7e3386 (patch) | |
tree | 1c6abddad02011394f204bd10cad3c84b91f0eb9 /src/main/java/org/luxons | |
parent | Add BonusPerBoardElement effect (diff) | |
download | seven-wonders-f7202edf8f94afba898646ea8ed2fe759b7e3386.tar.gz seven-wonders-f7202edf8f94afba898646ea8ed2fe759b7e3386.tar.bz2 seven-wonders-f7202edf8f94afba898646ea8ed2fe759b7e3386.zip |
Add MilitaryReinforcement effect
Diffstat (limited to 'src/main/java/org/luxons')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/boards/Board.java | 10 | ||||
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java | 21 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/boards/Board.java b/src/main/java/org/luxons/sevenwonders/game/boards/Board.java index d676ca82..c327ed72 100644 --- a/src/main/java/org/luxons/sevenwonders/game/boards/Board.java +++ b/src/main/java/org/luxons/sevenwonders/game/boards/Board.java @@ -25,6 +25,8 @@ public class Board { private int wonderLevel; + private int nbWarSymbols; + private int nbDefeatTokens; public Board(Wonder wonder, Settings settings) { @@ -84,6 +86,14 @@ public class Board { wonder.getLevels().get(wonderLevel).getEffect().apply(this, null, null); } + public int getNbWarSymbols() { + return nbWarSymbols; + } + + public void setNbWarSymbols(int nbWarSymbols) { + this.nbWarSymbols = nbWarSymbols; + } + public int getNbDefeatTokens() { return nbDefeatTokens; } diff --git a/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java b/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java new file mode 100644 index 00000000..53569866 --- /dev/null +++ b/src/main/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcements.java @@ -0,0 +1,21 @@ +package org.luxons.sevenwonders.game.effects; + +import org.luxons.sevenwonders.game.boards.Board; + +public class MilitaryReinforcements extends InstantEffect { + + private int count; + + public int getCount() { + return count; + } + + public void setCount(int count) { + this.count = count; + } + + @Override + public void apply(Board board, Board leftNeighbourBoard, Board rightNeighbourBoard) { + board.setNbWarSymbols(board.getNbWarSymbols() + count); + } +} |