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.
See how hard it would be to make
Table
'sseats
field be a new type,Seat
that contains its ownaction
andplayer
fields.Currently
action
andthis_round_action
are both fields insidePlayer
. 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 aSeat
struct that holdsaction
,this_round_action
andplayer
(which is anOption<Player>
).Turns out, I did this spike before creating this issue, so although it took a couple days, it's done.
Whee!