From 196a4b2c8816003ea7ad4ca572fee89ba158bc57 Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Sat, 13 Feb 2021 16:43:22 +0100 Subject: Remove unnecessary settings param --- sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt | 2 +- .../main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt | 2 +- .../main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt | 2 +- .../src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt | 2 +- sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt | 2 +- .../main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt | 2 +- .../kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt | 2 +- .../org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sw-engine/src/main/kotlin/org/luxons') diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt index 9043dded..35a2d9df 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt @@ -218,7 +218,7 @@ class Game internal constructor( private fun placePreparedCards(playedMoves: List) { playedMoves.forEach { move -> - move.place(discardedCards, settings) + move.place(discardedCards) hands = hands.remove(move.playerContext.index, move.card) } } diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt index ff970c92..c5665073 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt @@ -16,7 +16,7 @@ internal class BuildWonderMove(move: PlayerMove, card: Card, player: PlayerConte } } - override fun place(discardedCards: MutableList, settings: Settings) = wonder.placeCard(card.back) + override fun place(discardedCards: MutableList) = wonder.placeCard(card.back) override fun activate(discardedCards: List, settings: Settings) = wonder.activateLastBuiltStage(playerContext, transactions) diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt index c2da63dd..5af7e5b7 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt @@ -29,7 +29,7 @@ internal class CopyGuildMove(move: PlayerMove, card: Card, player: PlayerContext playerContext.getBoard(position).getPlayedCards().contains(card) // nothing special to do here - override fun place(discardedCards: MutableList, settings: Settings) = Unit + override fun place(discardedCards: MutableList) = Unit override fun activate(discardedCards: List, settings: Settings) { playerContext.board.copiedGuild = card diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt index 7635e1a3..f615b5b8 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt @@ -7,7 +7,7 @@ import org.luxons.sevenwonders.model.Settings internal class DiscardMove(move: PlayerMove, card: Card, player: PlayerContext) : CardFromHandMove(move, card, player) { - override fun place(discardedCards: MutableList, settings: Settings) { + override fun place(discardedCards: MutableList) { discardedCards.add(card) } diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt index b0035f63..5a41a0b4 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt @@ -16,7 +16,7 @@ internal abstract class Move( val transactions: ResourceTransactions = move.transactions - abstract fun place(discardedCards: MutableList, settings: Settings) + abstract fun place(discardedCards: MutableList) abstract fun activate(discardedCards: List, settings: Settings) } diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt index 01078919..66ac4e4c 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt @@ -14,7 +14,7 @@ internal class PlayCardMove(move: PlayerMove, card: Card, player: PlayerContext) } } - override fun place(discardedCards: MutableList, settings: Settings) = playerContext.board.addCard(card) + override fun place(discardedCards: MutableList) = playerContext.board.addCard(card) override fun activate(discardedCards: List, settings: Settings) = card.applyTo(playerContext, transactions) } diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt index 71c0824b..d4067a2b 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt @@ -15,7 +15,7 @@ internal class PlayFreeCardMove(move: PlayerMove, card: Card, playerContext: Pla } } - override fun place(discardedCards: MutableList, settings: Settings) = playerContext.board.addCard(card) + override fun place(discardedCards: MutableList) = playerContext.board.addCard(card) override fun activate(discardedCards: List, settings: Settings) { // only apply effects, without paying the cost diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt index bd2eeb86..2eb23fb5 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt @@ -23,7 +23,7 @@ internal class PlayFreeDiscardedCardMove( } } - override fun place(discardedCards: MutableList, settings: Settings) { + override fun place(discardedCards: MutableList) { discardedCards.remove(card) playerContext.board.addCard(card) } -- cgit