summaryrefslogtreecommitdiff
path: root/sw-engine
diff options
context:
space:
mode:
Diffstat (limited to 'sw-engine')
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMove.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/CopyGuildMove.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/DiscardMove.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/Move.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayCardMove.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeCardMove.kt2
-rw-r--r--sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/moves/PlayFreeDiscardedCardMove.kt2
-rw-r--r--sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt4
9 files changed, 10 insertions, 10 deletions
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<Move>) {
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<Card>, settings: Settings) = wonder.placeCard(card.back)
+ override fun place(discardedCards: MutableList<Card>) = wonder.placeCard(card.back)
override fun activate(discardedCards: List<Card>, 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<Card>, settings: Settings) = Unit
+ override fun place(discardedCards: MutableList<Card>) = Unit
override fun activate(discardedCards: List<Card>, 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<Card>, settings: Settings) {
+ override fun place(discardedCards: MutableList<Card>) {
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<Card>, settings: Settings)
+ abstract fun place(discardedCards: MutableList<Card>)
abstract fun activate(discardedCards: List<Card>, 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<Card>, settings: Settings) = playerContext.board.addCard(card)
+ override fun place(discardedCards: MutableList<Card>) = playerContext.board.addCard(card)
override fun activate(discardedCards: List<Card>, 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<Card>, settings: Settings) = playerContext.board.addCard(card)
+ override fun place(discardedCards: MutableList<Card>) = playerContext.board.addCard(card)
override fun activate(discardedCards: List<Card>, 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<Card>, settings: Settings) {
+ override fun place(discardedCards: MutableList<Card>) {
discardedCards.remove(card)
playerContext.board.addCard(card)
}
diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt
index a935fa7e..3515cd83 100644
--- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt
+++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/moves/BuildWonderMoveTest.kt
@@ -58,7 +58,7 @@ class BuildWonderMoveTest {
val card = hand[cardIndex]
val playerContext = PlayerContext(0, table, hand)
val move = createMove(playerContext, card, MoveType.UPGRADE_WONDER)
- move.place(mutableListOf(), settings)
+ move.place(mutableListOf())
move.activate(emptyList(), settings)
}
@@ -73,7 +73,7 @@ class BuildWonderMoveTest {
val initialStage = table.getBoard(0).wonder.nbBuiltStages
- move.place(mutableListOf(), settings)
+ move.place(mutableListOf())
val newStage = table.getBoard(0).wonder.nbBuiltStages
bgstack15