Closed Tenoke closed 2 years ago
Line 18, 21, and 24 in your script sometimes make non-integer raises which causes non-integer stack values. You should use floor division '//' instead of true division '/' to ensure the quotient value is always integral. I should have made it clear somewhere in the doc, but float stack values will cause some issues during chip distribution after the game ends. If you insist on using non-integer values, then you should give decimals a try. I am pretty sure that will work fine...
As for your remark about "despite needing to showdown to finish the hand," showdown is only necessary if two or more people remain in hand after all betting rounds. If everyone folded except one person, a showdown is not necessary. You can check whether or not the showdown should be done using "not game.is_terminal()" and "game.actor.can_showdown()" (kind of confusing I know).
Thanks, it must be the non-integer raises. I'll fix that.
You can check whether or not the showdown should be done using "not game.is_terminal()" and "game.actor.can_showdown()"
I do check it
if game.is_terminal() == False:
print(game.players)
print(game.actor)
print(game.actor.can_showdown(), game.actor.is_showdown_necessary())
SequenceView([PokerPlayer(0, 79.0, 2cJs), PokerPlayer(0, 81.0, ????)])
PokerPlayer(0, 81.0, ????)
True True
results in
despite needing to showdown to finish the hand