|
|
|
@ -76,6 +76,9 @@ abstract class CardsRow : HandHistoryRow { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* Returns the last card if any |
|
|
|
|
|
|
|
*/ |
|
|
|
protected open fun lastCard() : Card? { |
|
|
|
protected open fun lastCard() : Card? { |
|
|
|
return this.cardHolder?.cards?.lastOrNull() |
|
|
|
return this.cardHolder?.cards?.lastOrNull() |
|
|
|
} |
|
|
|
} |
|
|
|
@ -117,6 +120,9 @@ abstract class CardsRow : HandHistoryRow { |
|
|
|
|
|
|
|
|
|
|
|
protected open fun holderCreated() { } |
|
|
|
protected open fun holderCreated() { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* Returns whether more cards can be added to the holder |
|
|
|
|
|
|
|
*/ |
|
|
|
protected open fun canAddMoreCards(): Boolean { |
|
|
|
protected open fun canAddMoreCards(): Boolean { |
|
|
|
this.cardLimit()?.let { limit -> |
|
|
|
this.cardLimit()?.let { limit -> |
|
|
|
return this.cardCount < limit |
|
|
|
return this.cardCount < limit |
|
|
|
@ -124,6 +130,9 @@ abstract class CardsRow : HandHistoryRow { |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* Clears the holder cards |
|
|
|
|
|
|
|
*/ |
|
|
|
open fun clear() { |
|
|
|
open fun clear() { |
|
|
|
this.cardHolder?.cards?.clear() |
|
|
|
this.cardHolder?.cards?.clear() |
|
|
|
} |
|
|
|
} |
|
|
|
|