|
|
|
@ -130,11 +130,6 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
var clickPlayerPosition: Int? = null |
|
|
|
var clickPlayerPosition: Int? = null |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* The board cards sorted by position |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
// private lateinit var boardManager: BoardManager |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* The maximum number of cards in a player's hand |
|
|
|
* The maximum number of cards in a player's hand |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -545,7 +540,6 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
* Deletes all the card of the selected street |
|
|
|
* Deletes all the card of the selected street |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
fun clearCards() { |
|
|
|
fun clearCards() { |
|
|
|
// this.lastValue = null |
|
|
|
|
|
|
|
val row = this.rowRepresentables[this.currentSelection.index] as CardsRow |
|
|
|
val row = this.rowRepresentables[this.currentSelection.index] as CardsRow |
|
|
|
row.clear() |
|
|
|
row.clear() |
|
|
|
} |
|
|
|
} |
|
|
|
@ -572,17 +566,6 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// BoardChangedListener |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* Called when the board has changed |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
// fun boardChanged(cards: List<Card>) { |
|
|
|
|
|
|
|
// this.rowRepresentables.filterIsInstance<StreetCardsRow>().forEach { |
|
|
|
|
|
|
|
// // it.cards = cards |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Saves the current hand state in the database |
|
|
|
* Saves the current hand state in the database |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -611,11 +594,6 @@ class HandHistoryViewModel : ViewModel(), RowRepresentableDataSource, CardCentra |
|
|
|
return allCards |
|
|
|
return allCards |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|
|
|
* The value of the last chosen card |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
// private var lastValue: Card.Value? = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Returns true if the card [value] is available |
|
|
|
* Returns true if the card [value] is available |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|