I’ve created an extension that can represent playing cards. It has poker, pinochle, and euchre decks built-in, plus the ability to create shoes (à la blackjack). You also can create your own, custom decks! See the code in the sample project for more information on that. In that sample project, I build a deck of cards for the wonderful card game called Rook.
The card images are built on-the-fly as you need them, so there isn’t as much overhead compared to rendering all of the images when the deck is created. If you are only showing a few cards on the screen at a time, you should only be using up the memory required to display those cards on the screen (plus a little bit of overhead to represent the card “bases” for each suit).
Extension URL (for importing into your projects):https://github.com/robo-technical-group/pxt-arcade-playing-cards.git
See it in action here:
Let me know if you find any errors or have any suggestions for enhancements. Have fun!