subject

Asimple blackjack card game consists of a player and a dealer (the computer). a player is dealt cards, called a hand, as is the dealer. each card in the hand has a point value. cards with a number (2-10) have the number of points associated with their face value…e. g., a 5 has a value of 5 points. picture cards (jack, queen, king) each have a value of 10 points. an ace can have a value of 1 point or 11 points at the discretion of the player. the objective of the game is to get as close to 21 points as possible without exceeding 21 points. a player that goes over is out of the game. the dealer deals cards to itself and a player. the dealer must play by slightly different rules than a player. a game proceeds as follows: a player is dealt two cards face up. if the point total is exactly 21 the player wins immediately. if the total is not 21, the dealer is dealt two cards, one face up and one face down. a player then determines whether to ask the dealer for another card (called a "hit") or to "stay" with his/her current hand. a player may ask for several "hits." when a player decides to "stay" the dealer begins to play. if the dealer has 21 it immediately wins the game. otherwise, the dealer must take "hits" until the total points in its hand is 17 or over, at which point the dealer must "stay." if the dealer goes over 21 while taking "hits" the game is over and the player wins. if the dealer’s points total exactly 21, the dealer wins immediately. when the dealer and player have finished playing their hands, the one with the highest point total is the winner. play is repeated until the player decides to quit. a deck of playing cards contains 52 cards, made up of 13 cards from 4 suits (clubs, diamonds, hearts, and spades). you may assume that there are several decks or you may use a single deck. regardless of the implementation, cards will need to be recycled if all the cards are used and there is no winner yet. the deck, or decks, should be shuffled prior to the start of a new game…and there are several ways to do that using random numbers. it is up to you to determine how an ace is valued. one approach is to provide players with a choice. another approach is to program a strategy that will be automatically implemented. there are multiple strategies that can be used…one might be to always value an ace as 11 points so long as the total points in a hand will be 21 or less. a separate strategy may be needed for the dealer. in terms of program output, you can represent a playing card however you want. as an example, a queen of diamonds might be represented as q-d, and a 9 of clubs might be represented as 9-c. you must use an object-oriented approach in designing and implementing this program.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 24.06.2019 02:20
Peter is thinking of a number which isless than 50. the number has 9 factors.when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Ineed to know the anwser to all these questions
Answers: 2
You know the right answer?
Asimple blackjack card game consists of a player and a dealer (the computer). a player is dealt card...
Questions
Questions on the website: 13722361