Closed ctm closed 6 months ago
Yesterday, I created this issue with a few ideas and questions, but after sleeping on it, I decided to go with a very simple Options
based solution. For posterity, here is what I initially had in this issue description:
This should not actually include any bomb-pot specific code; it does, however, need to support the functionality that is currently missing from the new Double Board Bomb Pot structure (#1348). I don't want to add all-singing, all-dancing support for an arbitrary number of buttons, but if I can avoid painting myself into a corner, I'd like to.
So, I need to quickly see if I can find the various structures that have called for multiple buttons in the past. I think at least one iteration of CHORSE did. There may be others. I may as well ask on the BARGE list after I do a small amount of research myself.
Off the top of my head, I can think of a few different ways to add this functionality, one would be to add more state to
Options
, another would be to make a struct that implementsGameGroup
, but has the special property of only manipulating state and never have a hand dealt. Either way, I then need to figure out do I want a set of pseudo-commands that are fairly fine-grained but would give us a lot of flexibility (includeing—probably—the ability to combine them errantly), or do I want something that is more akin to "just use (for some definitions of use) an alternate button here".We're still three months away from June 15th, but since testing will initially only be done when someone chooses
"WSOP 2024\-style #41 NLHE & PLO with Double Board Bomb Pots
, adding the functionality sooner, rather than later may be less stressful.
Although I don't yet have the client showing the alternate button, I do—in theory—have all the server code in place. Light testing hasn't revealed any bugs, so it's time for me to update the client and then test some more.
Done. Deploying now. However, I changed TableStatus
more than I expected to.
Make it so mb2 can use a separate button to keep track of who acts last (and hence, who acts first) for bomb pots.
Option<SeatIndex>
alt_button
field toTable
bool
use_alt_button
toOptions
use_alt_button()
method toGameInfoBuilder<HoldEm>
and GameInfoBuilderuse_alt_button()
method toGameGroup
wsop_2024_41_nlhe_plo_with_double_board_bomb_pot
to addalt_button()
where neededTableStatus
bool
use_alt_button
Option<SeatIndex>
alt_button
Table::button
with&self.button
.button.seat
withbutton_seat()
Table::button_seat
to useself.game.use_alt_button()
button.seat
Table::advance_button
to use the aboveTable
'sbutton
fieldbutton_seat
TableStatus
fieldsalt_button
isSome
Profit!Test some more