aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/manager.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-08-03 14:08:09 -0400
committerhistoria <[not public]>2026-08-03 14:08:09 -0400
commit612e429de438821ae8e099d6b54f87c11ff6c1b5 (patch)
treead6f9edf74339b9b50f9c7c2cd314ee7b6e04b2c /internal/casino/manager.go
parentf51424c90dbce7191a31b6e675818c985f0f4539 (diff)
downloadthehouseoficarus-612e429de438821ae8e099d6b54f87c11ff6c1b5.tar.gz
refactor: casino game slop refactor
Diffstat (limited to 'internal/casino/manager.go')
-rw-r--r--internal/casino/manager.go14
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))