Hi all. Today I worked all day on my really old card game of 21. You play against the computer. I converted it from the ASIC 5.0 computer language (which was a lot like GW-BASIC with a tiny compiler). I made it much better with QB64. After testing it dozens of times lol I think there's no problems with it, but if you find any, please tell me. Thanks. I added ASCII card graphics as well as the ability for the computer to hold his cards without choosing one. It's usually who goes over 21 loses, like the original card game is, but if the computer holds his cards and you hold your cards, nobody gets to 21 and it's whoever has the highest number wins. Unlike the original card game, you get to see the computer's cards and he gets to see yours. So, like many card games, it's all about chance. I also added colored text and fixed the graphic detail on the welcome page. This is a good example of how BASIC programs used to be made in the 80's and 90's. :)
Edit: Instructions updated and re-posted on July 10, 2019.
'This game was made using ASIC programming language, which is like GW-BASIC, in 1997.
'It was later updated for QB64 programming language on July 9, 2019.
st:
f = 0
face = 0
pl = 0
t = 0
tt = 0
nn = 0
n = 0
c = 0
cc = 0
co = 0
uquit = 0
LINE (b
* 2, a
* 2)-((b
+ 5) * 2, (a
+ 5) * 2), co
, BF
INPUT "Press enter to begin game.", a$
PRINT " Whoever is closest to 21 wins." PRINT " But whoever goes over 21, loses." INPUT " Press enter to begin.", beg$
start:
you:
PRINT "Do you want to pick up a card (Y/N)";
you2:
tt = tt + 1
pl = 1
f = n
c = c + n
computer:
pl = 2
t = t + 1
tt = tt + 1
PRINT "Computer holds his cards." f = nn
PRINT "The Computer's card is a " cc = cc + nn
PRINT "The Computer's total is: ";
INPUT "Press enter for computer's turn.", b$
uover:
PRINT "You went over 21!" PRINT "The Computer automatically wins." uwin:
PRINT "Here is the score:"
total:
t = t - 1
PRINT "Computer quits after " + t$
+ " cards." PRINT "The Computer's total is: ";
tie:
PRINT "You and Computer finishes with a Tie!" PRINT "Here is the score: "
cwins:
PRINT "Here is the score:"
done:
PRINT "Do you want to play again (Y/N)";
cards:
design:
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1 DATA 1,1,1,1,2,2,1,2,2,1,1,1,1 DATA 1,1,1,2,2,2,2,2,2,2,1,1,1 DATA 1,1,2,2,2,2,2,2,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