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 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
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
question
Mathematics, 15.10.2019 07:30
question
Mathematics, 15.10.2019 07:30
Questions on the website: 13722361