A standard 52 deck of French-suited playing cards.
The Deck
instance has an array of cards. Upon instantiation, 52 cards are populated, in random order.
struct Dealer {
private var deck = Deck()
mutating func pullCard() -> PlayingCard? {
if let card = deck.pullCard() {
return card
}
self.deck = Deck()
return pullCard()
}
}