ctm / mb2-doc

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

Poor UX when joining during break #1293

Closed ctm closed 5 months ago

ctm commented 6 months ago

Fix so that if a player joins during the break, that player can see the table and the others at the table and the others can see that player.

I noted this problem in my mail to the BARGE list yesterday, but didn't make an issue for it and then got distracted by other things. I don't think it makes sense for me to try to get it done in time for this evening's game. Oops.

ctm commented 6 months ago

I may work on this today, but even if I solve it, I probably won't deploy until Sunday (i.e., after WYWAE) to avoid the chance of last minute breakage.

ctm commented 5 months ago

TableMessage::NewPlayersAdded only includes the PlayerId of the new player, but if we were to add the SeatIndex and ChipCount, then we could feed that to the ActionTracker. FWIW, the EventId is also passed in, which is kind of silly since it's a table message and tables are associated with event ids anyway.

ctm commented 5 months ago

NewPlayersAdded now includes the SeatIndex and ChipCount and ActionTracker, in theory, uses this info. I haven't yet determined which of the scenarios this fixes. I'll be doing that testing soon, but may get interrupted, so I'm updating this issue now.

ctm commented 5 months ago

Ugh. I just got around to testing it (i.e., I did get interrupted; very interrupted), and now the table doesn't even show up. I'll have to look at it tomorrow.

ctm commented 5 months ago

The problem appears to simply be that NickMapper isn't paying attention to TablesAdded, so it can't map the TableId to an EventId.

ctm commented 5 months ago

With NickMapper tracking TablesAdded the game works again and now a player who joins when there's no splitting works nicely. Splitting still needs work though. My guess is that the right messages are being sent, but that ActionTracker isn't paying attention.

ctm commented 5 months ago

Turns out, although ActionTracker wasn't paying attention to MovedFrom messages, the better solution was to simply send a status after a new table is created. That's not too expensive and it means I don't have to add new fields to MovedFrom or worry about the ordering of MovedTo and MovedFrom.

Deploying now.