Video Poker Takes Your Money in 10 Lines of BASIC

Video Poker Takes Your Money in 10 Lines of BASIC

It wasn’t easy, but [D. Scott Williamson] succeeded in implementing Jacks or Better Video Poker in 10 lines of BASIC, complete with flashing light and sound! Each round, one places a bet then plays a hand of 5-card draw, hoping to end up with Jacks or better.


This program is [Scott]’s entry into the 2024 BASIC 10 Liner Contest, which at this writing has concluded submissions and expects to announce results on April 6th 2024. Contestants may choose any 8-bit computer system BASIC, and must implement their program within ten lines of code (classically limited to 80 characters per line, but there are different categories with different constraints on line width.)


10 lines of BASIC is truly an exercise in information density.

We’ve seen impressive 10-line BASIC programs before, like this re-implementation of the E.T. video game. (Fun fact: while considered one of the worst video games of all time, there’s a compelling case to be made that while it was a flop, it was ahead of its time and mostly just misunderstood.)


These programs don’t look much like the typical BASIC programs many of us remember. They are exercises in information density, where every character counts. So we’re delighted to see [Scott] also provides a version of his code formatted and commented for better readability, and a logical overview that steps through each line.


He spends a ..

Support the originator by clicking the read the rest link below.