|
|
|
@ -421,18 +421,6 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// private fun definesIfHeroWins() { |
|
|
|
|
|
|
|
// this.heroIndex?.let { heroIndex -> |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val heroCards = this.playerSetupForPosition(heroIndex)?.cards |
|
|
|
|
|
|
|
// val heroNumberOfCards = heroCards?.size ?: 0 |
|
|
|
|
|
|
|
// if (this.board.size == 5 && heroNumberOfCards > 1) { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Creates a list of cards for the hand history to give a representation of the hand |
|
|
|
* Creates a list of cards for the hand history to give a representation of the hand |
|
|
|
* We will try to add a minimum of 5 cards using by priority: |
|
|
|
* We will try to add a minimum of 5 cards using by priority: |
|
|
|
@ -462,7 +450,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
cardSets.add(this.board) |
|
|
|
cardSets.add(this.board) |
|
|
|
|
|
|
|
|
|
|
|
// Try to add cards but not too much |
|
|
|
// Try to add cards but not too much |
|
|
|
while (views.size < 6 && cardSets.isNotEmpty()) { |
|
|
|
while (views.size < 5 && cardSets.isNotEmpty()) { |
|
|
|
|
|
|
|
|
|
|
|
val cardSet = cardSets.removeAt(0) |
|
|
|
val cardSet = cardSets.removeAt(0) |
|
|
|
|
|
|
|
|
|
|
|
@ -485,7 +473,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
return views |
|
|
|
return views |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun compareHands(activePositions: List<Int>): List<Int> { |
|
|
|
private fun compareHands(activePositions: List<Int>): List<Int> { |
|
|
|
|
|
|
|
|
|
|
|
// Evaluate all hands |
|
|
|
// Evaluate all hands |
|
|
|
val results = activePositions.map { |
|
|
|
val results = activePositions.map { |
|
|
|
|