Question: how it should look like write a code that can play this game automatically (computer chooses numbers rather than the user), goal is for computer

 how it should look like write a code that can play

how it should look like

this game automatically (computer chooses numbers rather than the user), goal is

for computer to cross out as many numbers as he can Write

write a code that can play this game automatically (computer chooses numbers rather than the user), goal is for computer to cross out as many numbers as he can

Write a MATLAB program to simulate the Shut the Box game that can: 1. 2. 3. Use two (2) 6-sided dice to interactively play the Shut the Box game for one player Print a number strip from 1 through 12 in the command window Generate two (2) random integers between 1 and 6 to represent the face value of rolling two dice 4. Print the two (2) dice values on screen 5. Sum the dice value and print the sum on screen for the player 6. ask the computer to decide which numbers to cross out. the computer can decide to cross out multiple number as long as the sum of the numbers equals sum of dice 7. Print all the crossed out number(s) on screen 8. Print all the open numbers on screen. 9. The game should keep rolling dice, printing the dice, summing the dice, printing the sum, asking the player to cross out number(s), printing all the crossed numbers, and printing all the open numbers on screen, until the player can no longer cross out any number to create a sum as same as the sum of the dice. 10. If the player cannot cross out any number, the player simply presses the Enter key without providing any number 11. When the player presses the Enter key without any number, the game should end. 12. If the numbers above six are all closed, the game should automatically roll only 13. After the game ends, compute the player's score by summing all the open 14. Print the score for the player in the command window one of the dice numbers together

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!