blob: 9294301091cbc2742656df15a73865230a47fd08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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)
}
|