render multiple draws into a single card

This commit is contained in:
2026-07-24 12:48:06 +01:00
parent 5a20a3cf2b
commit 3f0af6e5ec
2 changed files with 70 additions and 17 deletions

View File

@@ -81,10 +81,19 @@ var cmd = &cobra.Command{
}
count := viper.GetInt("count")
includeDrawHeading := count > 1
renders := make([]string, 0, count)
drawTitle := "Lottery"
for range count {
for i := range count {
l.Draw()
fmt.Println(renderDraw(l))
title, entry := renderDrawEntry(l, i+1, includeDrawHeading)
drawTitle = title
renders = append(renders, entry)
}
if len(renders) > 0 {
fmt.Println(renderDrawCollection(drawTitle, renders))
}
return nil