displayStatsMenu

This commit is contained in:
2023-04-02 00:36:12 -07:00
parent 7371cddab3
commit e1eac9de0f
3 changed files with 22 additions and 18 deletions

View File

@ -5,9 +5,8 @@ package cardsim
type Card[C StatsCollection] interface {
// Title is the short name of the card displayed in the hand
// and at the top of the card output. It receives the current
// player as an argument. If it returns an error that is not
// a warning, the game crashes.
Title(p *Player[C]) (Message, error)
// player as an argument.
Title(p *Player[C]) Message
// Urgent reports whether the card is considered urgent. If
// the player has any urgent cards in hand, they cannot choose to act
@ -68,8 +67,8 @@ type BasicCard[C StatsCollection] struct {
}
// Title implements Card.
func (b *BasicCard[C]) Title(_ *Player[C]) (Message, error) {
return b.CardTitle, nil
func (b *BasicCard[C]) Title(_ *Player[C]) Message {
return b.CardTitle
}
// Urgent implements Card.