function love.load()
deck = {}
for suitIndex, suit in ipairs({'club', 'diamond', 'heart', 'spade'}) do
for rank = 1, 13 do
table.insert(deck, {suit = suit, rank = rank})
end
end
playerHand = {}
table.insert(playerHand, table.remove(deck, love.math.random(#deck)))
table.insert(playerHand, table.remove(deck, love.math.random(#deck)))
print('Player hand:')
for cardIndex, card in ipairs(playerHand) do
print('suit: '..card.suit..', rank: '..card.rank)
end
print('Total number of cards in deck: '..#deck)
end