Want to create a number of card games sooo... need some playing card functions.
Result - a preliminary card library.
Code: Select all
local c = require 'cards'
Code: Select all
deck, order = c:createDeck()
a deck of 52 cards (quads)
order - a table of 52 randum numbers
The order in deck is:
1-13 are clubs (A 1 2 3 4 5 6 7 8 9 10 J Q K )
14-26 are diamonds
27-39 are spades
40-52 are hearts
Some other preliminary functions are provided for the display of the cards.
Edit: Changed dealing with a tweening function (outQuint).