It’s that time of year again, when fall is quickly ushered out to make room for all things holiday-related. For many of us, this means going on trips to visit relatives, which, depending on the relatives, can mean soul-crushing boredom. [Andy] has fun relatives who frequent the casino tables, and they inspired him to brush up on his blackjack game.
Some people would just find a virtual blackjack table or bust out an actual deck of cards to practice, but this is Hackaday. [Andy] busted out his PyPortal and tried his hand at making a blackjack game. The PyPortal is an Adafruit IoT box that makes it easy to scrape and display all kinds of JSON goodness from around the web, like NASA’s image of the day. GUI building is already baked in, so he just needed some oome open source playing card images and he was off.
The real gamble here might be the code he wrote; at 500+ lines, [Andy]’s probably pushing his luck with the PyPortal. But you know what they say — you can’t win if you don’t play. And if you want to improve your odds of winning, teach a robot to count cards for you.
Thanks for the tip, [foamyguy].
Thanks For sharing your valuable thought
You can write a simple blackjack game in 1 line of BASIC… it’s gonna be a long and horrible line, but doable. I wrote a blackjack for an old Casio FX 6600G http://www.arithmomuseum.com/album.php?cat=c&id=267&lang=en that only had 486 bytes of program memory.
Why would you link the calculator and not the code lol
Not even sure if I still have it, was 3 moves ago. The only way to save it though was hand write the damn thing out on paper. I lost the first spin when the calc saw subzero temps and the voltage went too low. Had to re-implement from memory, then after that remembered to write it out every so often (kept tinkering with it)