diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-16 01:36:14 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-16 02:24:33 +0100 |
commit | c849f4ba5516cab80a09c8ecde51ec2a885aa961 (patch) | |
tree | acc257782a5f1a0f158cf6d82fca10c1d294bddb /sw-engine/src/main/kotlin/org/luxons | |
parent | Add basic metrics (diff) | |
download | seven-wonders-c849f4ba5516cab80a09c8ecde51ec2a885aa961.tar.gz seven-wonders-c849f4ba5516cab80a09c8ecde51ec2a885aa961.tar.bz2 seven-wonders-c849f4ba5516cab80a09c8ecde51ec2a885aa961.zip |
Better naming isEmpty->areEmpty
Diffstat (limited to 'sw-engine/src/main/kotlin/org/luxons')
-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 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] |