More display components.
This commit is contained in:
parent
e1eac9de0f
commit
592c877852
@ -71,6 +71,9 @@ func pickNextAction[C StatsCollection](p *Player[C]) (isCard bool, cardIdx int,
|
|||||||
divider()
|
divider()
|
||||||
}
|
}
|
||||||
handOffset := displayPermanentActionsMenu(p, actionsOffset)
|
handOffset := displayPermanentActionsMenu(p, actionsOffset)
|
||||||
|
if handOffset > actionsOffset {
|
||||||
|
fmt.Println()
|
||||||
|
}
|
||||||
max := displayHandMenu(p, handOffset)
|
max := displayHandMenu(p, handOffset)
|
||||||
|
|
||||||
divider()
|
divider()
|
||||||
@ -180,7 +183,31 @@ func displayStatsMenu[C StatsCollection](p *Player[C]) int {
|
|||||||
fmt.Println("Info Panels")
|
fmt.Println("Info Panels")
|
||||||
fmt.Println("-----------")
|
fmt.Println("-----------")
|
||||||
for i, s := range p.InfoPanels {
|
for i, s := range p.InfoPanels {
|
||||||
fmt.Printf("[%2d]: %s", i+1, s.Title(p).String())
|
fmt.Printf("[%2d]: %s\n", i+1, s.Title(p).String())
|
||||||
}
|
}
|
||||||
return len(p.InfoPanels)
|
return len(p.InfoPanels)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func displayPermanentActionsMenu[C StatsCollection](p *Player[C], offset int) int {
|
||||||
|
if len(p.PermanentActions) == 0 {
|
||||||
|
return offset
|
||||||
|
}
|
||||||
|
fmt.Println("Always Available")
|
||||||
|
fmt.Println("----------------")
|
||||||
|
for i, s := range p.PermanentActions {
|
||||||
|
fmt.Printf("[%2d]: %s\n", i+offset+1, s.Title(p))
|
||||||
|
}
|
||||||
|
return offset + len(p.PermanentActions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func displayHandMenu[C StatsCollection](p *Player[C], offset int) int {
|
||||||
|
if len(p.Hand) == 0 {
|
||||||
|
return offset
|
||||||
|
}
|
||||||
|
fmt.Println("Hand")
|
||||||
|
fmt.Println("----")
|
||||||
|
for i, s := range p.Hand {
|
||||||
|
fmt.Printf("[%2d]: %s\n", i+offset+1, s.Title(p))
|
||||||
|
}
|
||||||
|
return offset + len(p.Hand)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user