diff options
Diffstat (limited to 'internal/casino/house_edge.go')
| -rw-r--r-- | internal/casino/house_edge.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/casino/house_edge.go b/internal/casino/house_edge.go index 01fe7aa..e175e24 100644 --- a/internal/casino/house_edge.go +++ b/internal/casino/house_edge.go @@ -59,6 +59,13 @@ func (c TableConfig) HouseEdge(bet string) HouseEdge { // HouseEdge reads seat-specific settings under the game's lock. It does not // alter game state, advance RNGs, or reveal cards from the current shoe. func (t *Table) HouseEdge(name, bet string) HouseEdge { + if p, ok := t.game.(*plinkoTable); ok { + p.mu.Lock() + defer p.mu.Unlock() + if p.name == name { + return edge(1 - plinkoReturn(p.risk, p.Config.Plinko.Normalize().RTP)) + } + } if vp, ok := t.game.(*videoPokerTable); ok { vp.mu.Lock() defer vp.mu.Unlock() |
