ctm / mb2-doc

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

Chip checker gets confused by lammer redemption #1292

Closed ctm closed 5 months ago

ctm commented 6 months ago

Fix so that when people redeem lammers, the chip checker understands.

Yesterday's evening tournament was "Pot Limit Big O (with lammers)" and the chip checker started squeeking:

2024-01-23T01:06:02.611233133Z 2024-01-23T01:06:02.610Z WARN  [mb2::tournament] At beginning of hand: Expected 100000, got 105000

its final complaint:

2024-01-23T02:17:49.342126181Z 2024-01-23T02:17:49.341Z WARN  [mb2::tournament] At beginning of hand: Expected 170000, got 240000

There were 12 players, each starts with 10,000 and has two lammers for 5,000, so 240,000 is the right amount. I'm surprised that the checker was off by 70,000 rather than 120,000, but that suggests that the chip checker takes redeemed lammers into account in some circumstances and not others.

I'm labeling this high priority because it should be trivial to reproduce and fix, and I really don't want the logs containing complaints about non-existent bugs. OTOH, we play very few tournaments that have lammers, so this isn't really that pressing.

ctm commented 6 months ago

FWIW, this bug caused warnings in the logs from this evening's tournament, because it was a lammer tournament, so I'll take a quick stab at it right now.

ctm commented 6 months ago

Fixed. Deploying now.

ctm commented 5 months ago

Oops. It triggered in yesterday's evening game.

2024-03-01T04:19:14.373Z WARN  [mb2::tournament] At end of hand: Expected 30000, got 40000
2024-03-01T04:19:16.381Z WARN  [mb2::tournament] At beginning of hand: Expected 30000, got 40000
2024-03-01T04:19:54.874Z WARN  [mb2::tournament] At end of hand: Expected 30000, got 40000
2024-03-01T04:19:56.880Z WARN  [mb2::tournament] At beginning of hand: Expected 30000, got 40000
2024-03-01T04:20:37.797Z WARN  [mb2::tournament] At end of hand: Expected 30000, got 50000
2024-03-01T04:20:39.803Z WARN  [mb2::tournament] At beginning of hand: Expected 30000, got 50000
2024-03-01T04:21:30.191Z WARN  [mb2::tournament] At end of hand: Expected 40000, got 60000
2024-03-01T04:21:32.199Z WARN  [mb2::tournament] At beginning of hand: Expected 40000, got 60000
...
2024-03-01T04:50:44.350Z WARN  [mb2::tournament] At beginning of hand: Expected 90000, got 120000
2024-03-01T04:51:22.556Z WARN  [mb2::tournament] At end of hand: Expected 90000, got 120000
2024-03-01T04:51:24.563Z WARN  [mb2::tournament] At beginning of hand: Expected 90000, got 120000
2024-03-01T04:51:44.801Z WARN  [mb2::tournament] At end of hand: Expected 90000, got 120000
2024-03-01T04:51:46.806Z WARN  [mb2::tournament] At beginning of hand: Expected 90000, got 120000
ctm commented 5 months ago

D'oh! Those are rebuys, not lammer redemptions. I must have overlooked those when I added the chip checker and then overlooked them again when I fixed the chip checker to properlly work with lammer redemptions.

ctm commented 5 months ago

Fixed. Deploying now.