(Solved) : Write Matlab Program Lets User Play Game Rock Paper Scissors Computer Scissors Cut Paper P Q42677555 . . .

Write a MATLAB program that lets the user play the game of Rock, Paper, and Scissors against the computer. Scissors cut paperWrite a MATLAB program that lets the user play the game of Rock, Paper, and Scissors against the computer. Scissors cut paper Paper wraps stone The program should work as follows: 1. When the program begins, a random number in the range of THE through 3 is generated. If the number is 1, then the computer has RULES chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Stone (Don’t display the computer’s choice yet.) blunts Scissors 2. The user clicks a button or enters his/her choice of “rock” “paper”, or “scissors” (You can use a GUI design of your preference. Such as 1 for “rock”, 2 for “paper”, or 3 for “scissors”). (Or you can use the design in Figure l as a guidance) 3. After that, the computer’s choice and the user’s choice will be displayed on the screen. 4. A winner is selected according to the following rules: • If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) • If both players make the same choice, the game must be played again to determine the winner Show transcribed image text Write a MATLAB program that lets the user play the game of Rock, Paper, and Scissors against the computer. Scissors cut paper Paper wraps stone The program should work as follows: 1. When the program begins, a random number in the range of THE through 3 is generated. If the number is 1, then the computer has RULES chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. Stone (Don’t display the computer’s choice yet.) blunts Scissors 2. The user clicks a button or enters his/her choice of “rock” “paper”, or “scissors” (You can use a GUI design of your preference. Such as 1 for “rock”, 2 for “paper”, or 3 for “scissors”). (Or you can use the design in Figure l as a guidance) 3. After that, the computer’s choice and the user’s choice will be displayed on the screen. 4. A winner is selected according to the following rules: • If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) • If both players make the same choice, the game must be played again to determine the winner

Expert Answer


Answer to Write a MATLAB program that lets the user play the game of Rock, Paper, and Scissors against the computer. Scissors cut …

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?