Zebra0.com

cardsCards

Cards

To create card games you use an array 0 to 51 (52 if you want a joker) .
Any card can be found from the numbers from 0 to 51 using
face=card%13; //a value from 0 to 12
suit=card/13; //a value from 0 to 3

If you want graphics you can use these or create your own:
Spades: Ace, 2 , 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
Hearts: Ace, 2 , 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
Diamonds: Ace, 2 , 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
Clubs:
Ace, 2 , 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K
Joker1, Joker2