package game import ( "fmt" "strings" "thehouseoficarus/internal/color" ) // The two packs have ranks 1-6, no suits. Distinct pack labels make the // replacement model visible without suggesting a conventional poker shoe. func renderCrapsCards(cards [2]int, mode string, unicode bool, style string) string { if cards[0] < 1 || cards[0] > 6 || cards[1] < 1 || cards[1] > 6 { return "" } top, bottom, bar := "+-------+", "+-------+", "|" if unicode { top, bottom, bar = "╭───────╮", "╰───────╯", "│" } spec := color.ColorSpec{Fg: 15, Bg: 0, Bold: true} if style == "light" { spec = color.ColorSpec{Fg: 0, Bg: 15, Bold: true} } var out strings.Builder for row := 0; row < 5; row++ { out.WriteString(" ") for i, n := range cards { line := top switch row { case 1: line = fmt.Sprintf("%s PACK %c%s", bar, 'A'+i, bar) case 2: line = fmt.Sprintf("%s %d %s", bar, n, bar) case 3: line = bar + " " + bar case 4: line = bottom } out.WriteString(color.Render(mode, spec, line) + " ") } out.WriteByte('\n') } fmt.Fprintf(&out, " Cards total: %d | Both packs replaced and reshuffled each draw.\n", cards[0]+cards[1]) return out.String() }