For Marchís program of the month, I offer up Stud. Written in 1984, it was my first computer card game. Calling it a card game is disingenuous as Stud is a simple high/low betting game. There are no rules or even a deck of cards. Yet simple can be fun in this random poker game.
An infinite deck of cards.
My goal when writing Stud was to create a graphic representation of cards. Based in part on my earlier dice games, Stud represents the cards as small squares. The suits arenít quite right either, using the symbols available to me on the ZX81. Yet, it works well enough.
Game play wise, it canít get any easier. Bet some money, and hope the cards go your way. And by cards, I mean yours is higher than the computerís. The game continues until youíve won the computers money, or you go bankrupt.
All looks, little substance.
Win or lose, Stud governs your destiny using the ZX81ís pseudorandom number generator. In fact, I use it twice to generate each cardóonce for the value, and again for the suit. Using a simple loop, the game stores the cards in an array.
As noted, there is no deck to shuffle. The game is random, making it more difficult then a real poker deck. No card counting here, the same card could, in theory, show up a dozen times. A real ZX81 isnít that random and would, without some nudging, generate the same sequence after each load.
The betting is actually logical. You always go firstónot something a real game wouldnít allow, but it works here. Then the computer picks a random bet, but if lower than yours it will match it. Iím quite proud of myself for thinking about that.
The rest of the game is presentation. There is a lot of text to display, and Stud doesnít shy from it. The cards, as simple as they are, make fair representations. It also uses INKEY$ instead of INPUT, a departure from some other games. Plus, it looks nice.
A few changes.
I did make a couple of changes from the original. Besides removing the ďplay again?Ē option, it also runs on start. I also removed the glaring errors and spelling mistakes. You could also break the original game, so I added some error checking to avoid that.
As for future changes, there isnít much to improve on. Sure, you could make better looking cards, but they work well enough. You could actually create a 52 card deck to shuffle and draw from. Yet, that would slow the game down and isnít necessary here. Note, that it is possible to draw the same card. I leave it to you to fix that if so desired.
Now, if drawing more cards, then I would recommend adding a deck to avoid duplicate cards. But, in doing so Iíd say create a blackjack game instead. Or, if adventurous, try creating a poker game instead. Some ideas in this game are good, but youíd be better off starting from scratch.
Originally published at www.reids4fun.com on March 24, 2017.