Question: There are some other question like this, but the rules are somewhat different. Please make sure that the code matches the rules thank you, will
There are some other question like this, but the rules are somewhat different. Please make sure that the code matches the rules thank you, will give a rating if it works.
Write a Java program to simulate Blackjack. Here are the rules of the game:
There is one deck of playing cards. Cards are drawn randomly (Shuffle() method).
The value of a hand is computed by adding the values of the cards in hand.
The value of a numeric card such as five is its numerical value.
The value of a face card is 10. Ace is either 1 or 11.
Ace is 11 unless it puts the total value of the hand over 21.
Second, third or fourth Ace are all counted as 1.
There are only two players in the game, you and the dealer.
Generate a random number between 16-21. This is the total score for the dealer.
Keep drawing as many cards (AddCard() method) as needed until the total value of the hand is equal or greater than the above random number. This is your total score.
You dont need to re-shuffle the remaining cards after each drawing.
You should have a class Hand, in which you compute and return the value of a hand based on the above rules.
You should notify the user if it is a Blackjack (only two cards are drawn with the total value of 21).
Log all drawn cards and the total value of a hand.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
