Question: Make sure to use the following in your code: INCLUDE C: Irvine Irvine 3 2 . inc INCLUDELIB C: Irvine Irivne

Make sure to use the following in your code: INCLUDE C:\Irvine\Irvine32.inc INCLUDELIB C:\Irvine\Irivne32.lib Write a program in masm x86 assembly language to accomplish the following: Create a Simplified Blackjack Game The game should begin with the user. a. Randomly deal two cards to the users hand. Display the card values and the associated suit for each card, as well as the total value of the hand for the user. b. The goal is for the user to have a hand that is as close as possible to a value of 21 without going over, so next the program should display a prompt, asking the user to Hit or Stand. c. If the user selects to Hit, the game should randomly deal a new card to the users hand, displaying the card value and suit, and must also calculate and display the new total value of the hand for the user. If the total is greater than 21, then the user busts, the house wins, and a message indicating these results is displayed. If the total is less than 21, repeat the Hit/Stand Prompt to the user. Continue this process until the user busts or elects to Stand. Once the user selects to Stand, then move on to the house hand a. Randomly deal two cards to the house, and calculate the total hand value for the house. b. Again, the display must include the value and suit of each card. c. The house MUST continue to Hit as long as the total of the hand is under 17, displaying the results after each Hit d. The dealer MUST Stand once the hand reaches 17 or higher. If the house busts, then the user wins. If neither the user nor the house bust, once the house stands, compare the users hand to the house hand and determine / display the results. The player closes to 21 without going over wins. Once a final game result has been displayed, prompt the user to with an option to play again. If the user selects to play again, start the program from the beginning, otherwise display a farewell message and terminate the program. The play again option must not be case sensitive. Cards: There are 4 suits: Clubs, Spades, Hearts, and Diamonds Each suit has 13 cards: 2,3,4,5,6,7,8,9,10, Jack, Queen King, Ace IMPORTANT: An Ace can have a value of 1 or 11, so account for this when displaying and evaluating results. If an 11 causes a hand to bust, then it can change to a 1. Whether the Ace is counted as an 11 or a 1 in the final hand (for either the user or the house) must depend on how it most benefits the hand. o EXAMPLE: Lets say that the initial hand was an Ace and a 5. The ACE would be counted as an 11 because 11+5=16, which would get the user (or house) closest to 21. Then the user decides to Hit and gets an 8.16+8=24, which without an Ace would cause the hand to bust. But since there IS an Ace, the value of the hand is only 14(Ace=1,5, and 8) o Include logic to evaluate and optimize the status of an Ace, as applicable, after the initial deal and each Hit. There must be instructions to the user, and the game prompts and displays must be visually organized and user-friendly!

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 Programming Questions!