Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MATLAB program to simulate the Tenzi party game automatically that can Play Tenzi for multiple players simultaneously and automatically Ask the game host

image text in transcribed

Write a MATLAB program to simulate the Tenzi party game automatically that can Play Tenzi for multiple players simultaneously and automatically Ask the game host to input how many players will play Use ten (10) 6-sided dice to automatically play the Tenzi game for each player. For example, 4 players will use a total of forty (40) dice Generate ten (10) random integers between 1 and 6 to represent the face value of rolling ten dice for each player to simulate all players roll at the same time. For example, a 6-player game will generate 60 random integers. Print all the dice values on screen and clearly indicate which player (i.e. player 1, player 2, and so on...) rolls what values. Based on the first roll results, the program should automatically decide the best numbers to keep for all the players. The program should be able to automatically keep different dice values best for each player. The program must be able to make the best decisions without bias for all the players 1. 2. 3. 4. 5. 6. 7. Set aside the dice rolled with the number by counting and printing "the number of dice on the side" for all the players in the command window Print the face values of the dice that are set aside on screen for all the players Roll the remaining dice by generating as many random integers between 1 and 6 as needed for all the players. 8. 9. 10. Print the remaining dice values on screen for all the players and clearly indicate 11. Set aside the dice with the desired value (determined in step 6) and print "the 12. Print the face values of the dice that are set aside on screen for all the players which player (i.e. player 1, player 2, and so on...) rolls what values total number of dice on the side" for every player in the command window 13. Keep rolling the remaining dice until one of the players gets ten (10) dice of the 14. Track the number of rounds the players roll dice and print the round number in the 15. Print which player shouts out "TENZI" on screen same number. command window

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

Step: 3

blur-text-image

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

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago