From 3a39a020e4449bc4d6f728ef837cffb9f7bd0c56 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 3 Oct 2026 19:46:54 -0400 Subject: feat: new casino game: plinko --- internal/casino/house_edge.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/casino/house_edge.go') 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() -- cgit v1.2.3