|
|
|
@ -477,7 +477,8 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
val heroWins: Boolean? |
|
|
|
val heroWins: Boolean? |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
return this.heroIndex?.let { heroIndex -> |
|
|
|
return this.heroIndex?.let { heroIndex -> |
|
|
|
this.winnerPots.any { it.position == heroIndex } |
|
|
|
heroIndex == this.largestWonPot?.position |
|
|
|
|
|
|
|
// this.winnerPots.any { it.position == heroIndex } |
|
|
|
} ?: run { |
|
|
|
} ?: run { |
|
|
|
null |
|
|
|
null |
|
|
|
} |
|
|
|
} |
|
|
|
@ -733,7 +734,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
return boardHasWildCard || playerCardHasWildCard |
|
|
|
return boardHasWildCard || playerCardHasWildCard |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val allFullCards: List<Card> |
|
|
|
private val allFullCards: List<Card> |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
val cards = mutableListOf<Card>() |
|
|
|
val cards = mutableListOf<Card>() |
|
|
|
cards.addAll(this.board) |
|
|
|
cards.addAll(this.board) |
|
|
|
@ -753,4 +754,9 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
return cards.filter { it.isSuitWildCard } |
|
|
|
return cards.filter { it.isSuitWildCard } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val largestWonPot: WonPot? |
|
|
|
|
|
|
|
get() { |
|
|
|
|
|
|
|
return this.winnerPots.maxBy { it.amount } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |