diff options
Diffstat (limited to 'internal/game/render_pai_gow.go')
| -rw-r--r-- | internal/game/render_pai_gow.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/internal/game/render_pai_gow.go b/internal/game/render_pai_gow.go index 4b31373..b125a68 100644 --- a/internal/game/render_pai_gow.go +++ b/internal/game/render_pai_gow.go @@ -72,8 +72,9 @@ func paiGowNumberLabels(nums []int, mode string) []string { return labels } -// paiGowCardBlock renders one labeled run of cards: an optional centered -// header over the card art and, when nums is set, position numbers below. +// paiGowCardBlock renders one labeled run of cards: an optional header over +// the card art and, when nums is set, position numbers below. The header is +// plain left-justified text, not centered, so the hand labels read normally. func paiGowCardBlock(header string, cards []casino.CardView, nums []int, mode string, unicode bool, size int, style string, store *cardart.Store) []string { if len(cards) == 0 { return nil @@ -86,11 +87,7 @@ func paiGowCardBlock(header string, cards []casino.CardView, nums []int, mode st if header == "" { return lines } - width := 0 - for _, line := range lines { - width = max(width, color.VisibleLen(line)) - } - return append([]string{rouletteCenter(header, width)}, lines...) + return append([]string{header}, lines...) } // paiGowJoinBlocks sets two card blocks side by side with a gutter between |
