diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt index ce8a8383..ff5636da 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt @@ -76,6 +76,9 @@ abstract class CardsRow : HandHistoryRow { } } + /*** + * Returns the last card if any + */ protected open fun lastCard() : Card? { return this.cardHolder?.cards?.lastOrNull() } @@ -117,6 +120,9 @@ abstract class CardsRow : HandHistoryRow { protected open fun holderCreated() { } + /*** + * Returns whether more cards can be added to the holder + */ protected open fun canAddMoreCards(): Boolean { this.cardLimit()?.let { limit -> return this.cardCount < limit @@ -124,6 +130,9 @@ abstract class CardsRow : HandHistoryRow { return true } + /*** + * Clears the holder cards + */ open fun clear() { this.cardHolder?.cards?.clear() }