summaryrefslogtreecommitdiff
path: root/sw-engine/src/main/kotlin/org/luxons
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-27 20:51:34 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-27 20:51:44 +0200
commit3136b76c6364fd586be53e27f2532bbdd4f79a53 (patch)
treeec92f97e093840ff31441a611957895303bcd63a /sw-engine/src/main/kotlin/org/luxons
parentRemove ugly emoji from README (diff)
downloadseven-wonders-3136b76c6364fd586be53e27f2532bbdd4f79a53.tar.gz
seven-wonders-3136b76c6364fd586be53e27f2532bbdd4f79a53.tar.bz2
seven-wonders-3136b76c6364fd586be53e27f2532bbdd4f79a53.zip
Rename discardHand to clearHand for clarity
Diffstat (limited to 'sw-engine/src/main/kotlin/org/luxons')
-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/cards/Hands.kt2
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)
bgstack15