diff options
| author | historia <[not public]> | 2026-10-01 14:38:08 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 14:38:08 -0400 |
| commit | 1082f3336085c15992ca83d5553c0ba52208d70a (patch) | |
| tree | 4fcedaa90bc01c41456258a9d57f492f31754948 /internal/game/casino.go | |
| parent | d4eae333a8d8a96452bbf3617aa85b50466c11a7 (diff) | |
| download | thehouseoficarus-1082f3336085c15992ca83d5553c0ba52208d70a.tar.gz | |
feat: pai gow poker added to the casino
Diffstat (limited to 'internal/game/casino.go')
| -rw-r--r-- | internal/game/casino.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/game/casino.go b/internal/game/casino.go index d433f2a..e6c0f27 100644 --- a/internal/game/casino.go +++ b/internal/game/casino.go @@ -726,6 +726,8 @@ func (g *Game) renderCasinoSnapshot(sess *net.Session, snapshot casino.Snapshot) // how verbose the command menus are. size := sess.Player.OptionInt("card_size") switch s := snapshot.(type) { + case *casino.PaiGowSnapshot: + return renderPaiGow(s, mode, unicode, size, sess.Player.OptionString("card_style"), g.CardArt) case *casino.VideoPokerSnapshot: return renderVideoPoker(s, mode, unicode, size, sess.Player.OptionString("card_style"), g.CardArt) case *casino.CrapsSnapshot: @@ -904,7 +906,7 @@ func cardRenderSize(unicode bool, size int) int { return 7 } -var suitSymbols = map[string]string{"hearts": "♥", "spades": "♠", "diamonds": "♦", "clubs": "♣"} +var suitSymbols = map[string]string{"hearts": "♥", "spades": "♠", "diamonds": "♦", "clubs": "♣", "joker": "★"} func cardSymbol(card casino.CardView) string { if card.Hidden { @@ -917,7 +919,13 @@ func cardArtLines(card casino.CardView, size int, unicode bool, style string, ar if card.Hidden { return generatedCardArt("?", "", size, unicode, style) } - key := card.Rank + strings.ToUpper(card.Suit[:1]) + key := card.Rank + if card.Rank == "JK" { + return jokerCardArt(size, unicode, style, art) + } + if card.Suit != "" { + key += strings.ToUpper(card.Suit[:1]) + } if configured := art.Art(key, size); len(configured) == size { if unicode && style == "light" { // The shared pip art draws a dark box frame, which leaves the top |
