|
|
|
@ -85,19 +85,20 @@ class ReplayerAnimator(var handHistory: HandHistory, var export: Boolean) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
* Returns the number of visual occurrences for the current frame |
|
|
|
* Returns the number of visual occurrences for the current frame with some specific cases: |
|
|
|
* This function returns a longer value for the last frame of the last step |
|
|
|
* 1/ Preflop folds are faster due to their "useless-ivity" |
|
|
|
* because some player auto-replay videos because we want the viewer to have a pause. |
|
|
|
* 2/ The last frame of the last step is longer because some video players |
|
|
|
|
|
|
|
* auto-replay videos, and we want viewers to visualize the end. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private val visualOccurences: Int |
|
|
|
private val visualOccurences: Int |
|
|
|
get() { |
|
|
|
get() { |
|
|
|
val step = this.currentStep |
|
|
|
val step = this.currentStep |
|
|
|
return when { |
|
|
|
return when { |
|
|
|
step is ComputedAction && step.street == Street.PREFLOP && step.action.type == Action.Type.FOLD -> { |
|
|
|
step is ComputedAction && step.street == Street.PREFLOP && step.action.type == Action.Type.FOLD -> { |
|
|
|
FrameType.STATE.visualOccurences / 3 |
|
|
|
FrameType.STATE.visualOccurences / 4 |
|
|
|
} |
|
|
|
} |
|
|
|
this.currentStepIndex == this.steps.size - 1 && this.currentFrameIndex == this.numberOfFramesForCurrentStep - 1 -> { |
|
|
|
this.currentStepIndex == this.steps.size - 1 && this.currentFrameIndex == this.numberOfFramesForCurrentStep - 1 -> { |
|
|
|
FrameType.STATE.visualOccurences * 3 |
|
|
|
FrameType.STATE.visualOccurences * 4 |
|
|
|
} |
|
|
|
} |
|
|
|
else -> this.frameType.visualOccurences |
|
|
|
else -> this.frameType.visualOccurences |
|
|
|
} |
|
|
|
} |
|
|
|
@ -659,23 +660,6 @@ class ReplayerAnimator(var handHistory: HandHistory, var export: Boolean) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// do { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// do { |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// val bitmap = Bitmap.createBitmap(this.width.toInt(), this.height.toInt(), Bitmap.Config.ARGB_8888) |
|
|
|
|
|
|
|
// val canvas = Canvas(bitmap) |
|
|
|
|
|
|
|
// TableDrawer.drawTable(this, canvas, context) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// Timber.d("frame drawn at step: $currentStepIndex, frame: $currentFrame") |
|
|
|
|
|
|
|
// frameHandler(bitmap, this.visualOccurences) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// } while (this.shouldShowAdditionalFrame) |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// nextStep() |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
// } while (this.hasMoreSteps) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*** |
|
|
|
/*** |
|
|
|
|