Question: Using Java Twenty-One The game is played with cards. Number cards (2,3,4,5,6,7,8,9,10) are worth their shown values. Other cards (Jack, Queen, King, Ace) are worth

Using Java

Twenty-One

The game is played with cards. Number cards (2,3,4,5,6,7,8,9,10) are worth their shown values. Other cards (Jack, Queen, King, Ace) are worth 10. The objectives of the game are to get cards as close to the value of 21 without going over and to beat the dealer. Assume the casino is using multiple decks for Twenty-One. Duplicates can be drawn in the same game.

Gameplay is as follows:

The user makes a bet, the casino matches the amount to create the pot

2 cards are dealt to the player, 2 cards are dealt to the dealer

The user can see both of their cards and one of the dealers cards

The user can choose to either draw a new card or stay with their current hand

If a user chooses to draw and their hand total exceeds 21, the casino wins

Once the user chooses to stay, the dealer will either draw a new card or stay

If the dealers hand is 17 or higher, they stay. If it is lower than 17, they draw

If the dealer draws and their hand total exceeds 21, the user wins

If both the dealer and the user stay, the totals are compared and the higher total wins

In case of a tie, the customer receives the initial bet back

The winner wins the pot and adds the money to their balance

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!