Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need a GUI for this rock paper scissors code on Matlab. close all clc clear var player1=input('Player 1 please choose 1 for rock, 2 for

Need a GUI for this rock paper scissors code on Matlab.

close all clc clear var player1=input('Player 1 please choose 1 for rock, 2 for paper, or 3 for scissors:'); player2=input('Player 2 please choose 1 for rock, 2 for paper, or 3 for scissors:'); if player1 == 1 if player2 == 1 result = 'Tie!' elseif player2 == 2 result = 'Player 2 wins!' else result = 'Player 1 loses!' end elseif player1 == 2 if player2 == 1 result = 'Player 1 wins!' elseif player2 == 2 result = 'Tie!' else result = 'Player 2 loses!' end elseif player1 == 3 if player2 == 1 result = 'Player 2 wins!' elseif player2 == 2 result = 'Player 1 wins!' else result = 'Tie!' end for k = 1:3 end end

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

=+Is the sex relevant to the issue?

Answered: 1 week ago

Question

=+What forms of industrial action are common?

Answered: 1 week ago