Question: Write a MATLAB program to simulate the Beat That! game with additional features that can: Use two 6 - sided dice and up to seven

Write a MATLAB program to simulate the Beat That! game with additional features that can:
Use two 6-sided dice and up to seven 6-sided dice to play the game between a player and a talking AI.
Greet the player and briefly explain how to play the game when the game starts ?[1pt].
Initialize the number of dice to three dice ?[1pt]. Allow the player to press the 2 through 7 key then hit the Enter key to change the number of dice before each round ?1pt.
Press q or Q then hit the Enter key to quit the game ?[1pt].
Press any other key on the keyboard then hit the Enter key to play one round ?[1pt]. Directly hitting the Enter key to play is optional.
Allow the player to modify the number of dice to play before every round. The game should allow the player to change the number of dice as often as the player wants without any preset value to limit how many times the player can change the total number of dice ?[6pt].
If the player doesn't change the number of dice, continue to use the previous number of dice to play the game with the player ?[6pt]. The game should not have any pre-set value to limit the total number of rounds the player can play using a certain number of dice. For example, the player should be able to freely decide during the game to play the four dice game with the computer for 3 rounds, then switch to play the seven dice game with the computer for 4 rounds, and so on...
Use random integers between 1 and 6 to represent the face value of rolling dice.
Generate as many random integers as the number of dice used in each round for the player ?16 pt]. Print all the dice values on screen ?[6pt].
Generate as many random integers as the number of dice used in each round for the computer ?[6pt]. Print all the dice values on screen ?[6pt].
Sort the player's dice values in acceding or descending order ?[1pt]. For example, a roll of 3,2 and 6 can be sorted to 6,3 and 2.
Sort the computer's dice values in acceding or descending order ?[1pt].
Compute the best value rolled for the player ?[6pt]. For example, the sorted values of 6,3 and 2 can be combined into 632.
Compute the best value rolled for the computer 6pt.
Print the player's best value on screen ?[3pt].
Print the computer's best value on screen ?[3pt].
Compare the player's best value and the computer's best value and select a winner ?[2pt]. It is also possible that the match is a tie ?[1pt].
Print the match result on screen ?[1pt]. For example, the player wins, the computer wins, or the match ends in a tie.
Allow the player to press a key between 2 and 7 to change the number of dice ?[1pt], press the q or Q key then hit the Enter key to quit ?[1pt] and press any other key on the keyboard then hit the Enter key to play again ?[1pt]. The game should allow the player to play one round after another without any pre-set value to limit the total number of rounds the player can play ?[4pt].
Track the game statistics. Count the total number of rounds being played ?[1ptt], the number of rounds the player won ?[1pt], the number of rounds the computer won ?[1pt], and the number of rounds ended in ties ?[1pt].
When the player decides to press q or Q to quit playing, the game should end 4pt. Greet the player farewell ?[1pt] and print the total number of rounds played ?[1pt], the number of rounds the player won ?[1pt], the number of rounds the computer won ?[1pt], and the number of rounds ended in ties on screen ?[1pt].
Add voice to the game to report the details of the game for the player.
The following websites can convert any text into voices with downloadable mp3 files.
www.text2speech.org
Write a MATLAB program to simulate the Beat That!

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!