diff options
Diffstat (limited to 'game-engine/src/main/java/org')
-rw-r--r-- | game-engine/src/main/java/org/luxons/sevenwonders/game/Game.java | 3 | ||||
-rw-r--r-- | game-engine/src/main/java/org/luxons/sevenwonders/game/boards/Board.java | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/Game.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/Game.java index ed11913b..853d7490 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/Game.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/Game.java @@ -95,7 +95,8 @@ public class Game { private Action determineAction(List<HandCard> hand, Board board) { if (endOfGameReached() && board.hasSpecial(SpecialAbility.COPY_GUILD)) { - return Action.PICK_NEIGHBOR_GUILD; + List<Card> neighbourGuildCards = table.getNeighbourGuildCards(board.getPlayerIndex()); + return neighbourGuildCards.isEmpty() ? Action.WAIT : Action.PICK_NEIGHBOR_GUILD; } else if (hand.size() == 1 && board.hasSpecial(SpecialAbility.PLAY_LAST_CARD)) { return Action.PLAY_LAST; } else if (hand.size() == 2 && board.hasSpecial(SpecialAbility.PLAY_LAST_CARD)) { diff --git a/game-engine/src/main/java/org/luxons/sevenwonders/game/boards/Board.java b/game-engine/src/main/java/org/luxons/sevenwonders/game/boards/Board.java index a59bbfae..23ce5da5 100644 --- a/game-engine/src/main/java/org/luxons/sevenwonders/game/boards/Board.java +++ b/game-engine/src/main/java/org/luxons/sevenwonders/game/boards/Board.java @@ -57,6 +57,10 @@ public class Board { this.publicProduction.addFixedResource(wonder.getInitialResource(), 1); } + public int getPlayerIndex() { + return playerIndex; + } + public Wonder getWonder() { return wonder; } |