More display components.
This commit is contained in:
		| @@ -71,6 +71,9 @@ func pickNextAction[C StatsCollection](p *Player[C]) (isCard bool, cardIdx int, | ||||
| 			divider() | ||||
| 		} | ||||
| 		handOffset := displayPermanentActionsMenu(p, actionsOffset) | ||||
| 		if handOffset > actionsOffset { | ||||
| 			fmt.Println() | ||||
| 		} | ||||
| 		max := displayHandMenu(p, handOffset) | ||||
|  | ||||
| 		divider() | ||||
| @@ -180,7 +183,31 @@ func displayStatsMenu[C StatsCollection](p *Player[C]) int { | ||||
| 	fmt.Println("Info Panels") | ||||
| 	fmt.Println("-----------") | ||||
| 	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) | ||||
| } | ||||
|  | ||||
| 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) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user