diff options
| author | historia <[not public]> | 2026-10-03 19:46:54 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-03 19:46:54 -0400 |
| commit | 3a39a020e4449bc4d6f728ef837cffb9f7bd0c56 (patch) | |
| tree | 9ba1cd5f2aef6ef7c54fdf5b02a780604b5af80b /internal/casino/house_edge.go | |
| parent | c6d4702c0be4d2b37e1d82ff96265c52847c3f9a (diff) | |
| download | thehouseoficarus-3a39a020e4449bc4d6f728ef837cffb9f7bd0c56.tar.gz | |
feat: new casino game: plinko
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() |
