To remind you of the rules
of Blackjack:
-the object is to get your
card values to total 21 without going over
-you start out with two cards,
but may take additional ones (hits) until you decide to either stop (stand)
or your card totals go over 21 (you bust). You do not have to take
any additional cards if you don’t want to.
-Aces are worth either 1 or
11 (which ever one favors player most)
-all face cards are worth
10 pts.
-An initial draw of an Ace
and a face card is a “Blackjack”, an immediate win
Otherwise the player with
the highest total less than or equal to 21 wins.
If the computer busts, you
win.
If the computer and player
tie no one wins and everyone gets their money back.
The rectangles should initially show the outlines of two cards and the player should have an initial amount of money (up to you to decide) which is shown as well. The player should then be prompted for a bet (you can decide whether there is a maximum bet, or whether the player can bet their entire balance). Then the values of the cards should be displayed all except the one value of the computer that the player isn’t supposed to know. Then the player should be prompted for an option to hit or stand. Repeat this prompt until the player chooses stand, or his total is over 21. When that happens the computer should take hits for values of 16 or lower, but stand at 17 or higher, but only if the player hasn’t busted. Then just proceed with the game format, comparing values and awarding wins or losses and then either adding or subtracting the bet to the balance. The program should quit when the user presses ‘q’.