games: the rake you pay, and the rake the table lifts
They are different numbers and the felt was quoting the wrong one. Every raked pot has chips lifted off it, whoever wins — that has to stay true or the table stops balancing. But the bots' chips are not real, so a pot a bot wins costs you nothing, and the counter under your stack was climbing anyway while you sat there folding. Rake is now every chip off the table (so the chips conserve) and Paid is the part that came out of a pot you won, which is the only part that is money and the only part worth telling you about. A chop costs you half of it. The audit log takes Paid too: the house's income is what it made off the player, not what it lifted off a bot. Claude-Session: https://claude.ai/code/session_013M5nD7PgUboJXoDcYHzpuJ
This commit is contained in:
@@ -131,19 +131,6 @@ func (s *State) payPot(pot Pot, live []ranked, evs *[]Event) {
|
||||
return
|
||||
}
|
||||
|
||||
amount := pot.Amount
|
||||
if s.Flopped {
|
||||
rake := int64(math.Floor(float64(amount) * s.Tier.RakePct))
|
||||
if cap := s.Tier.BB * rakeCapBB; rake > cap {
|
||||
rake = cap
|
||||
}
|
||||
if rake > 0 {
|
||||
amount -= rake
|
||||
s.Rake += rake
|
||||
*evs = append(*evs, Event{Kind: "rake", Seat: -1, Amount: rake})
|
||||
}
|
||||
}
|
||||
|
||||
eligible := make(map[int]bool, len(pot.Eligible))
|
||||
for _, seat := range pot.Eligible {
|
||||
eligible[seat] = true
|
||||
@@ -165,6 +152,30 @@ func (s *State) payPot(pot Pot, live []ranked, evs *[]Event) {
|
||||
return
|
||||
}
|
||||
|
||||
amount := pot.Amount
|
||||
if s.Flopped {
|
||||
rake := int64(math.Floor(float64(amount) * s.Tier.RakePct))
|
||||
if cap := s.Tier.BB * rakeCapBB; rake > cap {
|
||||
rake = cap
|
||||
}
|
||||
if rake > 0 {
|
||||
amount -= rake
|
||||
s.Rake += rake // every chip of it, so the table still balances
|
||||
|
||||
// But only the part that came out of *your* winnings is money the house
|
||||
// actually made, and it is the only part the felt should quote you. The
|
||||
// bots' chips are not real — the only real money at this table is yours —
|
||||
// so raking a pot a bot won costs you nothing, and a counter that climbed
|
||||
// while you folded would be telling you it had.
|
||||
for _, w := range winners {
|
||||
if w.seat == You {
|
||||
s.Paid += rake / int64(len(winners))
|
||||
}
|
||||
}
|
||||
*evs = append(*evs, Event{Kind: "rake", Seat: -1, Amount: rake})
|
||||
}
|
||||
}
|
||||
|
||||
share := amount / int64(len(winners))
|
||||
odd := amount % int64(len(winners)) // the odd chip goes to the first seat left of the button
|
||||
for i, w := range winners {
|
||||
|
||||
Reference in New Issue
Block a user