|
|
|
|
@ -143,9 +143,7 @@ class Builder { |
|
|
|
|
val computedAction = this.sortedActions.first { it.action.index == index } |
|
|
|
|
computedAction.action.type = actionType |
|
|
|
|
|
|
|
|
|
dropIfNecessary(index) |
|
|
|
|
|
|
|
|
|
// remaining stack + effective amount |
|
|
|
|
dropNextActionsIfNecessary(index) |
|
|
|
|
|
|
|
|
|
when (actionType) { |
|
|
|
|
Action.Type.CALL -> { |
|
|
|
|
@ -164,8 +162,10 @@ class Builder { |
|
|
|
|
return computedAction.requireAmount |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun dropIfNecessary(index: Int) { |
|
|
|
|
this.sortedActions.drop(index + 1) |
|
|
|
|
private fun dropNextActionsIfNecessary(index: Int) { |
|
|
|
|
if (index > this.handHistory.numberOfPlayers) { |
|
|
|
|
this.sortedActions.drop(index + 1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
|
|