Posted 20 September 2014 - 07:20 AM
Simple API with function shuffling a deck and rendering playing cards.
Example of using:
Download:
Example of using:
--cRender(monitorSide, xPosOfCard, yPosOfCard, cardType, cardValue, suit, color)
os.loadAPI("cardAPI")
tEst = cardAPI.shuffle()
for i = 1, 52 do
val = string.sub(tEst[i], 1, 1)
suit = string.sub(tEst[i], 2, 2)
if suit == 'c' or suit == 's' then color = colors.black else color = colors.red end
cardAPI.cRender('right', 2, 2, '01', val, suit, color)
sleep(1)
end
Download:
Edited on 26 September 2014 - 04:50 AM