aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-03 07:11:58 -0400
committerhistoria <[not public]>2026-10-03 07:11:58 -0400
commit0fb83bdf433b9b48240f4ac7a5d4c912f6b808cc (patch)
treeac0af51cc2513b1ddd8a280f360af820d1f097af /internal/game/casino.go
parent6232d41e5639f9c38e47b2bb65266e343ca26e8f (diff)
downloadthehouseoficarus-0fb83bdf433b9b48240f4ac7a5d4c912f6b808cc.tar.gz
feat: added big 6 wheel to the casino
Diffstat (limited to 'internal/game/casino.go')
-rw-r--r--internal/game/casino.go35
1 files changed, 30 insertions, 5 deletions
diff --git a/internal/game/casino.go b/internal/game/casino.go
index 8f18614..6dce0bd 100644
--- a/internal/game/casino.go
+++ b/internal/game/casino.go
@@ -380,6 +380,21 @@ func (g *Game) startCasinoGame(sess *net.Session, p *player.Player, gameName str
g.emitCasinoEvents(events)
}
+// Keep slots' spin-as-bet behavior, while Big 6 spins already committed wagers.
+func (g *Game) executeSpin(sess *net.Session, args []string, rawInput string) {
+ if sess.Player != nil {
+ if table, playing := g.Casino.Participation(sess.Player.Name); playing && table != nil && table.Config.Game == casino.GameBigSix {
+ if len(args) != 0 {
+ sess.WriteLine("Use spin after placing your bets.")
+ return
+ }
+ g.executeTableAction(sess, "spin")
+ return
+ }
+ }
+ g.executeBet(sess, args, rawInput)
+}
+
func (g *Game) executeBet(sess *net.Session, args []string, rawInput string) {
p := sess.Player
if p == nil {
@@ -537,7 +552,13 @@ func (g *Game) rouletteSpinning(sess *net.Session) bool {
return false
}
table, playing := g.Casino.Participation(sess.Player.Name)
- if !playing || table == nil || table.Config.Game != casino.GameRoulette {
+ if !playing || table == nil {
+ return false
+ }
+ if table.Config.Game == casino.GameBigSix {
+ return table.Busy(sess.Player.Name)
+ }
+ if table.Config.Game != casino.GameRoulette {
return false
}
s, ok := table.Board(sess.Player.Name).(*casino.RouletteSnapshot)
@@ -677,8 +698,8 @@ func (g *Game) casinoHintsVisible(sess *net.Session, menu *casino.MenuView) bool
}
}
-// casinoBoardReminder splits a persistent-board menu (craps, roulette, video
-// poker, Pai Gow) so its instructions print under the board they describe.
+// casinoBoardReminder splits a persistent-board menu (craps, roulette, Big 6,
+// video poker, Pai Gow) so its instructions print under the board they describe.
// Every other game, and compact displays, keep their menu in one block.
func (g *Game) casinoBoardReminder(sess *net.Session, category string, menu *casino.MenuView, snapshot casino.Snapshot, message string) (reminder string, ok bool) {
if category != "casino_menu" || menu == nil || sess.Player == nil {
@@ -687,11 +708,13 @@ func (g *Game) casinoBoardReminder(sess *net.Session, category string, menu *cas
_, isCraps := snapshot.(*casino.CrapsSnapshot)
_, isPoker := snapshot.(*casino.VideoPokerSnapshot)
_, isPaiGow := snapshot.(*casino.PaiGowSnapshot)
+ b, isBigSix := snapshot.(*casino.BigSixSnapshot)
+ isBigSix = isBigSix && b.Phase != "playing" && b.Phase != "result"
s, isRoulette := snapshot.(*casino.RouletteSnapshot)
- if !isPoker && !isCraps && !isPaiGow && (!isRoulette || s.Phase == "playing" || s.Phase == "result") {
+ if !isPoker && !isCraps && !isPaiGow && !isBigSix && (!isRoulette || s.Phase == "playing" || s.Phase == "result") {
return "", false
}
- if !isPoker && !isCraps && !isPaiGow && sess.Player.OptionString("casino_display") == "compact" && (menu.Repeat || !menu.ShowBalance) {
+ if !isPoker && !isCraps && !isPaiGow && !isBigSix && sess.Player.OptionString("casino_display") == "compact" && (menu.Repeat || !menu.ShowBalance) {
// The compact reminder is already a short block; leave it intact.
return "", false
}
@@ -780,6 +803,8 @@ func (g *Game) renderCasinoSnapshot(sess *net.Session, snapshot casino.Snapshot)
return renderVideoPoker(s, mode, unicode, size, sess.Player.OptionString("card_style"), g.CardArt)
case *casino.CrapsSnapshot:
return renderCrapsSnapshot(s, mode, unicode, sess.Player.OptionString("card_style"))
+ case *casino.BigSixSnapshot:
+ return renderBigSixSnapshot(s, mode, unicode)
case *casino.RouletteSnapshot:
return renderRouletteSnapshot(s, mode, unicode, size)
case *casino.SlotSnapshot: