Make your own free website on Tripod.com

In Public:courses.cs456 there are a collection of bit-maps which represent the 52 different playing cards. Write a VB interface for a simplified game of Blackjack.

Briefly the play of the game should proceed as follows:

  1. There is one player and one dealer.
  2. The player makes a bet in $$$$$.
  3. The player is dealt 2 cards which are visible.
  4. The player now tries to get as close to a score of 21 as possible where face cards count as 10, the ace as 11 and all other cards count the value on their face. If you have a total count that is greater than 21 then you have BUST and you lose.
  5. The player may ask for one or more cards until he feels he is as close to 21 as he feels he needs to get. He then STANDS. Then he turns play over to the dealer.
  6. The dealer then takes 2 cards. If he has 17 or more he STANDS otherwise he keeps taking cards until he either ends up with 17 or more (STANDS or he has more than 21 (BUST).
  7. If the player is closer to 21 than the dealer he wins.
  8. If the dealer is closer to 21 than the player he wins.
  9. If the player BUSTS and the dealer has 17 or more then the dealer wins.
  10. If the player BUSTS and the player has not then the player wins.
  11. If both dealer and player busts or their count is tied then it is a TIE and nobody wins.

Write VB code that will play the game until the player says STOP. Keep track of the total winnings of the player.

(Prepared by Ken Blundell, UMKC)