From c371788a9063663bdb8bd0b9346b1381cf9cc6d0 Mon Sep 17 00:00:00 2001 From: jbion Date: Thu, 22 Dec 2016 22:06:23 +0100 Subject: Remove middleman methods in Board --- src/main/java/org/luxons/sevenwonders/game/api/Table.java | 4 ++-- src/main/java/org/luxons/sevenwonders/game/boards/Board.java | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'src/main/java') 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 d906a5f1..44c9076f 100644 --- a/src/main/java/org/luxons/sevenwonders/game/api/Table.java +++ b/src/main/java/org/luxons/sevenwonders/game/api/Table.java @@ -55,7 +55,7 @@ public class Table { public void buildWonderStage(int playerIndex, CardBack cardBack) { Board board = boards.get(playerIndex); - board.buildWonderStage(cardBack); + board.getWonder().buildLevel(cardBack); } public void activateCard(int playerIndex, Card card, List boughtResources) { @@ -64,7 +64,7 @@ public class Table { public void activateCurrentWonderStage(int playerIndex, List boughtResources) { Board board = boards.get(playerIndex); - board.activateCurrentWonderLevel(this, playerIndex, boughtResources); + board.getWonder().activateLastBuiltStage(this, playerIndex, boughtResources); } public void discard(int playerIndex, int goldBonus) { 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 7e310979..f2f39503 100644 --- a/src/main/java/org/luxons/sevenwonders/game/boards/Board.java +++ b/src/main/java/org/luxons/sevenwonders/game/boards/Board.java @@ -5,10 +5,7 @@ import java.util.List; import org.luxons.sevenwonders.game.Player; import org.luxons.sevenwonders.game.Settings; -import org.luxons.sevenwonders.game.api.BoughtResources; -import org.luxons.sevenwonders.game.api.Table; import org.luxons.sevenwonders.game.cards.Card; -import org.luxons.sevenwonders.game.cards.CardBack; import org.luxons.sevenwonders.game.cards.Color; import org.luxons.sevenwonders.game.resources.Production; import org.luxons.sevenwonders.game.wonders.Wonder; @@ -85,14 +82,6 @@ public class Board { this.gold = amount; } - public void buildWonderStage(CardBack cardBack) { - wonder.buildLevel(cardBack); - } - - public void activateCurrentWonderLevel(Table table, int playerIndex, List boughtResources) { - wonder.activateLastBuiltStage(table, playerIndex, boughtResources); - } - public int getNbWarSymbols() { return nbWarSymbols; } -- cgit