This started out as the first practical assignment in a Python Object-Oriented Programming class. There was nothing satisfying about playing blackjack in a terminal so I got in the mix with PyGame.
You can play this in browser here: https://eoinmtreacy.github.io/blackjack/, but if you want a performant version I recommend running it locally.
- Clone the repo
pip install pygame
python main.py
Something to note: the version of the code served to the browser is actually from the wasm branch. This is due to some of the quirks associated with compiling PyGame to WebAssembly with Pygbag.
These same quirks are what causes its performance to really suffer in browser. I wrote a blog post about what I learned about the process: