|
|
|
@ -95,7 +95,7 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Number of players in the hand |
|
|
|
* Number of players in the hand |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
var numberOfPlayers: Int = 4 |
|
|
|
var numberOfPlayers: Int = 9 |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Number of players in the hand |
|
|
|
* Number of players in the hand |
|
|
|
@ -169,27 +169,27 @@ open class HandHistory : RealmObject(), Deletable, RowRepresentable, Filterable, |
|
|
|
this.session = handSetup.session |
|
|
|
this.session = handSetup.session |
|
|
|
this.date = this.session?.handHistoryAutomaticDate ?: Date() |
|
|
|
this.date = this.session?.handHistoryAutomaticDate ?: Date() |
|
|
|
|
|
|
|
|
|
|
|
this.createActions() |
|
|
|
this.createActions(handSetup) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Creates the initial actions of the hand history |
|
|
|
* Creates the initial actions of the hand history |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private fun createActions() { |
|
|
|
private fun createActions(handSetup: HandSetup) { |
|
|
|
|
|
|
|
|
|
|
|
this.actions.clear() |
|
|
|
this.actions.clear() |
|
|
|
|
|
|
|
|
|
|
|
this.addAction(0, Action.Type.POST_SB, this.smallBlind) |
|
|
|
this.addAction(0, Action.Type.POST_SB, this.smallBlind) |
|
|
|
this.addAction(1, Action.Type.POST_BB, this.bigBlind) |
|
|
|
this.addAction(1, Action.Type.POST_BB, this.bigBlind) |
|
|
|
|
|
|
|
|
|
|
|
// val positions = Position.positionsPerPlayers(this.numberOfPlayers) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var lastStraddler: Int? = null |
|
|
|
// var lastStraddler: Int? = null |
|
|
|
// straddlePositions.forEach { position -> // position are sorted here |
|
|
|
|
|
|
|
// val positionIndex = positions.indexOf(position) |
|
|
|
val positions = Position.positionsPerPlayers(this.numberOfPlayers) |
|
|
|
// this.addAction(positionIndex, Action.Type.STRADDLE) |
|
|
|
handSetup.straddlePositions.forEach { position -> // position are sorted here |
|
|
|
|
|
|
|
val positionIndex = positions.indexOf(position) |
|
|
|
|
|
|
|
this.addAction(positionIndex, Action.Type.STRADDLE) |
|
|
|
// lastStraddler = positionIndex |
|
|
|
// lastStraddler = positionIndex |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// val totalActions = this.actions.size |
|
|
|
// val totalActions = this.actions.size |
|
|
|
// val startingPosition = lastStraddler?.let { it + 1 } ?: totalActions |
|
|
|
// val startingPosition = lastStraddler?.let { it + 1 } ?: totalActions |
|
|
|
|