diff options
Diffstat (limited to 'sw-engine')
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/Game.kt | 2 | ||||
-rw-r--r-- | sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt | 2 |
2 files changed, 2 insertions, 2 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 8a5c1d93..f7c29214 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 @@ -193,7 +193,7 @@ class Game internal constructor( private fun discardHand(playerIndex: Int) { val hand = hands[playerIndex] discardedCards.addAll(hand) - hands = hands.discardHand(playerIndex) + hands = hands.clearHand(playerIndex) } private fun activatePlayedCards(playedMoves: List<Move>) = diff --git a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt index 9f73cd67..f1f49cd8 100644 --- a/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt +++ b/sw-engine/src/main/kotlin/org/luxons/sevenwonders/engine/cards/Hands.kt @@ -13,7 +13,7 @@ internal class Hands(private val hands: List<List<Card>>) { return hands[playerIndex] } - fun discardHand(playerIndex: Int): Hands { + fun clearHand(playerIndex: Int): Hands { val mutatedHands = hands.toMutableList() mutatedHands[playerIndex] = emptyList() return Hands(mutatedHands) |