CardSimEngine/cardsim/infopanel.go
Kistaro Windrider 7f8dcd63d6
Introduce InfoPanel.
InfoPanels are information displays that do not cost actions. One of them (the Prompt) is shown at the main menu; others can be made available as options in the menu, ether on an ongoing basis or for the current/next turn only.
2023-04-01 12:30:39 -07:00

14 lines
470 B
Go

package cardsim
// An InfoPanel displays some set of stats to the player. It does
// not consume an action. It must not advance the state of the game
// in any way.
type InfoPanel[C StatsCollection] interface {
// Title returns the title of this InfoPanel, which is also used as the
// label presented to the player to access this panel.
Title(p *Player[C]) (Message, error)
// Info returns the contents of this InfoPanel.
Info(p *Player[C]) ([]Message, error)
}