package game import ( "log" ) type Store struct { PileOfCardsBase } func NewStore() *Store { s := &Store{PileOfCardsBase{[]*Card{}}} return s } func (s *Store) AddCard(card *Card) { if !card.IsBuyable() { log.Panicf("Non buyable card %s can not be added to a store", card.Name) } s.PileOfCardsBase.AddCard(card) }