ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Dealer's choice structures use Some((0, 0)) for split_bets where it doesn't matter #1337

Closed ctm closed 7 months ago

ctm commented 7 months ago

Change split_bets: Some((0.into(), 0.into())) to split_bets: None, so we don't get warnings.

I added warnings to check stakes to make sure we don't use Some(x) where x is logically 0 (e.g. (0.into(), 0.into())), and other than the bomb pot structures which were doing that with blinds (thereby ensuing hilarity), our two Dealer's Choice structures do this with split_bets in the stakes for the game choice (i.e. where that field isn't even read).

So, there's no bug here to fix, but my sanity checker will squawk if I don't fix it.

ctm commented 7 months ago

Fixed. Deploying now. FWIW, this was a bigger PITA to fix than I expected, due to some crazy stuff we do with limit in Options as well as the fact that Dealer's Choice is a bit crazy.