Here is an old Black Jack game listing from waaay back in the 70s, According to 101 BASIC computer Games it originated from DEC – author unknown.
Anyway, reasonably complex, supports up to seven players has insurance, splits and double downs.
If you ever wanted to get a taste of the weirdness of BASIC coding this is a good 322 line (commented) example:
In defense of the code: – part is that there was no multi-line IF conditionals so you had to get creative – micros being so memory limited usually had a 2 character limit on variable names – there was a lot of twisted logic sometimes to get a game crammed into a small memory footprint
I’m gonna re-factor it into PHP, but thought it was a good example to discuss here: BASIC, refactoring such code, etc.
Source site with more BASIC game listings – http://www.vintage-basic.net/games.html
What do you think?