ctm / mb2-doc

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

Late entrant after play was down to the money #1330

Closed ctm closed 4 months ago

ctm commented 4 months ago

Disallow late registration and re-entry once the number of players is less than or equal to the number of places paid.

Currently the rule is that nobody is allowed to join once one place has been paid. That is not what people want or expect. They expect that once they've "made the money" that nobody else should be able to join.

I've labeled this a bug, even though the code currently works as I initially thought it should. As such, there's no logic or programming error to correct, just an update of policy. However, players probably see the old policy as a bug, hence the label.

ctm commented 4 months ago

On the server side, the checks are done in RunningEvent'sverify_late_registration_is_availableandverify_re_entry, both of which callhas_paid_out. Changing those is trivial. However, the client looks for aWon` message to determine when not to allow a new player to join, and those only get sent when there's an actual payout.

The lobby (i.e., the client) knows how many people are in the tournament, but doesn't yet know how many places pay. I think it probably makes more sense to have the lobby keep track of how many places pay than to keep track of whether the money has been made, although either way will work for this particular issue and in both cases the relevant state will need to be sent to clients that connect or reconnect after an event is already started in addition to however the client handles an event that starts after the lobby is connected. That case can either be done with no new messages, or we can send a message each time it changes. I lean toward the latter.

ctm commented 4 months ago

I chose to go with the simpler solution for the client, after all. NickMapper now just sends the new message InTheMoney and the client uses that.

Deploying now.