diff --git a/deck.go b/deck.go index bbccfb6..54e9f9a 100644 --- a/deck.go +++ b/deck.go @@ -23,6 +23,9 @@ func NewDeck() *Deck { } func (deck *Deck) Copy() *Deck { + if deck == nil { + return nil + } deck2 := &Deck{ cards: make([]Card, len(deck.cards)), }