Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help...any thoughts? This is Codehs Java. 5.10.9: Improving Blackjack 10 points Exercise 5.10.9: Improving Blackjack pot In this exercise your goal is to improve the

image text in transcribedimage text in transcribedimage text in transcribedHelp...any thoughts? This is Codehs Java. 5.10.9: Improving Blackjack

10 points Exercise 5.10.9: Improving Blackjack pot In this exercise your goal is to improve the blackjack game we created in the videos Here are a few possible extensions you can implement: 1) Insurance - A side bet if the dealer shows an ace 2) Splitting - If two cards are the same, split them into two hands and double the bet. 3) Double down - Double the bet and get one more card Read more about these features: https://en.wikipedia.org/wiki/Blackjack#Player_decisions O 5.10.9: Improving Blackjack SAVE UBMIT CONTINUE 2This plays the Blackjack card game that we wrote throughout 3the videos in this lesson. 5 Try to play the game and test it out. As you play it, can y 6of ways to improve the game? can you think of ways to improve the code 7or organize the code? 8 1 9 eauthor jkeesh 10 12 public class Blackjack extends consoleProgram 13 14 15 16 17 18 19 20 21 private static final int HEARTS 0 private static final int DIAMONDS = 1; private static final int SPADES 2; private static final int CLUBS 3; private static final int JACK # 11; private static final int oUEEN 12 private static final int KING 13; private static final int ACE 14; 23 24 25 26 27 28- 29 30 31 32 // The starting bankroll for the player private static final int STARTING BANKROLL 100; Ask the player for a move, hit or stand : ereturn A lowercase string of "hit" or "stand" : ' to indicate the player's move. 34 private string getPlayerMove() This plays the slackjack card gane that we urote throughout " the videos in this lesson. In this exerche your goal is to improve the blackjack game we created i " Try to play the gane and test it out. As you play it, can you think of ways to inprove the gane? can you think of ways to inprove the code or organize the code? videos Here are a few possble extensioens you can implement 0 Insurance-A side bet if the dealer shows an ace eauthor jkeesh Splitting-rtwo cards are the same, split them into two hands and do the bet. 3Double down-Double the bet and get one more cand public elass Blackjack extends consoleProgran Reed more about these features private static final int HEARTS private static final int DIARONDS 1: private static final int SPADES 2 private static final int cLUBS3 private static final int JACK 11 private statie final int qUEEN 12; private static final int kING 13 private static final int ACE 14 // The starting bankroll for the player private static final int STARTING BANKROLL-300 " Ask the player for a sove, hit or stand ereturn A lowercase string of hit" or "stand "to indicate the player's move orivate string getplayerMove)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions