rafanoronha / scala-poker

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

Smallest unit of currency in the game #51

Closed Naktibalda closed 10 years ago

Naktibalda commented 10 years ago

I don't know how to call this issue better.

In the cash game the smallest unit of currency should be 0.01 (money shouldn't be divided to smaller parts), If the chips are used (e.g. in tournament), chips shouldn't be split at all, so the smallest unit is 1.

This setting should be a property of a table.

Naktibalda commented 10 years ago

This is particularly important for splitting a pot #44 because pot of 3 can be divided to (1.50, 1.50) if a unit is divisible, and to (2,1) if a unit is non-divisible.

One way to avoid using this hard to name setting is to use a Long type for bet amounts, stacks and pots. In the cash game we could use a smaller unit of currency (e.g. cent) internally, but display it as a bigger unit (dollar).

rafanoronha commented 10 years ago

AFAIK fantasy stakes chips are the facto standard, so they are the way to go. For the time being I'd go with the simplest solution - probably turning back to Int as our unit of choice.

The cash side of the business is still out of scope because we didn't start to design the code that should support the mechanics of tournaments.

I've found some related information in the following page: http://www.buypokerchips.com/Articles.asp?ID=294

Naktibalda commented 10 years ago

This ticket can be closed after merge