ctm / mb2-doc

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

Investigate splitting action from Player #1227

Closed ctm closed 1 year ago

ctm commented 1 year ago

See how hard it would be to make Table's seats field be a new type, Seat that contains its own action and player fields.

Currently action and this_round_action are both fields inside Player. Pots are built by summing all the action from the various players. That means we can't move a player who has folded until after the hand is over. That would make table splitting (#1088) even more painful. So, see how hard it would be to refactor in a Seat struct that holds action, this_round_action and player (which is an Option<Player>).

Turns out, I did this spike before creating this issue, so although it took a couple days, it's done.

Whee!

ctm commented 1 year ago

Done. Deploying now.