rafanoronha / scala-poker

Having fun while coding a brand new open source scala poker library
MIT License
21 stars 12 forks source link

Feature request: Round pot stacks #45

Closed Naktibalda closed 10 years ago

Naktibalda commented 10 years ago

Currently StackManagement keeps a total better's contribution to the pot.

It is convenient for calculating side pots, so I want to keep this functionality, but it is very inconvenient for calculating Call and Raise amounts, it would be much better if we kept an amount that the better bet in the current round separately.

I really need this for a BettingRound.placeRaise function - it has incorrect calculation now.

rafanoronha commented 10 years ago

Absolutely, go ahead :+1:

Naktibalda commented 10 years ago

I has been thinking about this issue.

My idea is that the chips should move from players stacks to table stacks when betting, at the end of the round all table stacks are passed to PotManager, which calculates the main pot and side pots and keeps track what players contributes to the side pots.

Naktibalda commented 10 years ago

I will try it implement it my way, it is up to you to accept it or do it your way.

rafanoronha commented 10 years ago

@Naktibalda feel free to submit your code. sorry for not coming with something yet, I'm all messed up