diff options
| author | historia <[not public]> | 2026-10-03 01:38:58 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-03 01:38:58 -0400 |
| commit | 0ec8f3692960a064616e630c914058298b22897b (patch) | |
| tree | 2b51327eb66be7df8fdcd7c12cc306ca6fa84891 /internal/game/render_video_poker.go | |
| parent | 82e571d227feeafd0af4011e701ce26b99c5e3d9 (diff) | |
| download | thehouseoficarus-0ec8f3692960a064616e630c914058298b22897b.tar.gz | |
feat: replaced roulette wheel graphic with line-by-line 'spin'
Diffstat (limited to 'internal/game/render_video_poker.go')
| -rw-r--r-- | internal/game/render_video_poker.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/internal/game/render_video_poker.go b/internal/game/render_video_poker.go index 719b36a..045bdc7 100644 --- a/internal/game/render_video_poker.go +++ b/internal/game/render_video_poker.go @@ -161,8 +161,16 @@ func renderVideoPoker(s *casino.VideoPokerSnapshot, mode string, unicode bool, s if i == 0 && len(art) > 0 && decorated { art[0] += " " + badge + bonus } - if len(s.Lines) > 1 && len(art) > 0 { - art[0] = fmt.Sprintf("%3d: ", i+1) + art[0] + indent := "" + if len(s.Lines) > 1 { + indent = " " + for row := range art { + prefix := indent + if row == 0 { + prefix = fmt.Sprintf("%3d: ", i+1) + } + art[row] = prefix + art[row] + } } lines = append(lines, art...) text := "No win" @@ -178,7 +186,7 @@ func renderVideoPoker(s *casino.VideoPokerSnapshot, mode string, unicode bool, s text += fmt.Sprintf(" | earns %dx", s.Next[i]) } // Results always follow the cards, including compact hundred-play. - lines = append(lines, color.Render(mode, color.ColorSpec{Fg: fg, Bg: -1, Bold: true}, text)) + lines = append(lines, indent+color.Render(mode, color.ColorSpec{Fg: fg, Bg: -1, Bold: true}, text)) } if s.Result != "" { fg := pokerYellow |
