diff options
Diffstat (limited to 'sw-engine')
3 files changed, 4 insertions, 4 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 35a2d9df..86526abe 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 @@ -183,7 +183,7 @@ class Game internal constructor( private fun getMoveToPerformFor(playerIndex: Int) = preparedMoves[playerIndex] ?: throw MissingPreparedMoveException(playerIndex) - private fun endOfAgeReached(): Boolean = hands.isEmpty + private fun endOfAgeReached(): Boolean = hands.areEmpty private fun executeEndOfAgeEvents() { // this is necessary because this method is actually called twice in the 3rd age if someone has CPY_GUILD 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 a2a7a805..f33e97d2 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 @@ -7,7 +7,7 @@ import org.luxons.sevenwonders.model.cards.HandRotationDirection internal class Hands(private val hands: List<List<Card>>) { - val isEmpty: Boolean = this.hands.all(List<Card>::isEmpty) + val areEmpty: Boolean = this.hands.all(List<Card>::isEmpty) operator fun get(playerIndex: Int): List<Card> { return hands[playerIndex] diff --git a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt index 97920f3e..8921b558 100644 --- a/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt +++ b/sw-engine/src/test/kotlin/org/luxons/sevenwonders/engine/cards/HandsTest.kt @@ -42,13 +42,13 @@ class HandsTest { ) { assumeTrue(nbCardsPerPlayer >= 1) val hands = createHands(nbPlayers, nbCardsPerPlayer) - assertFalse(hands.isEmpty) + assertFalse(hands.areEmpty) } @Theory fun isEmpty_trueWhenAllEmpty(@FromDataPoints("nbPlayers") nbPlayers: Int) { val hands = createHands(nbPlayers, 0) - assertTrue(hands.isEmpty) + assertTrue(hands.areEmpty) } @Theory |