diff options
| author | historia <[not public]> | 2026-08-03 14:08:09 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-08-03 14:08:09 -0400 |
| commit | 612e429de438821ae8e099d6b54f87c11ff6c1b5 (patch) | |
| tree | ad6f9edf74339b9b50f9c7c2cd314ee7b6e04b2c /internal/casino/manager.go | |
| parent | f51424c90dbce7191a31b6e675818c985f0f4539 (diff) | |
| download | thehouseoficarus-612e429de438821ae8e099d6b54f87c11ff6c1b5.tar.gz | |
refactor: casino game slop refactor
Diffstat (limited to 'internal/casino/manager.go')
| -rw-r--r-- | internal/casino/manager.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/casino/manager.go b/internal/casino/manager.go index d6a3825..46ad692 100644 --- a/internal/casino/manager.go +++ b/internal/casino/manager.go @@ -165,6 +165,20 @@ func (m *Manager) Bet(roomID int, tableID, name string, amount int, wallet Walle return []Event{{RoomID: roomID, TableID: tableID, Type: EventResult, Player: name, PrivateTo: name, Message: "That game is not available here."}} } +func (m *Manager) Action(roomID int, tableID, name, action string) []Event { + if table := m.Table(roomID, tableID); table != nil { + return table.action(name, action) + } + return []Event{{RoomID: roomID, TableID: tableID, Type: EventResult, PrivateTo: name, Message: "That game is not available here."}} +} + +func (m *Manager) RebetAmount(roomID int, tableID, name string) int { + if table := m.Table(roomID, tableID); table != nil { + return table.rebetAmount(name) + } + return 0 +} + func (m *Manager) MarkDisconnected(name string) []Event { m.mu.Lock() tables := make([]*Table, 0, len(m.tables)) |
