Rock Paper Scissors Lizard Spock (RPSLS) is an extended version of the classical game of chance Rock Paper Scissors. This game is created by Sam Kass and Karen Bryla. his game, the players pick one of the following variables: rock, paper, scissors, lizard, spock. The outcome of the game is determined by the rules below specifying which ariable defeats the other. If both players choose the same variable, the game ends in a draw. Rules: • scissors cut paper • paper covers rock • rock captures lizard • lizard poisons spock • spock smashes scissors • scissors captures lizard • lizard eats paper • paper disproves spock • spock vaporizes rock • rock crushes scissors n this project, you will write a program that takes two strings representing the choices of the players as inputs and prints the outcome of the RPSLS game. There are three ossible outcomo s of this gamo: a tio a win for plaver 1 and a win for playor 2 VoL are sun posed to dotormnine the outcomo doponding on tbe plavere' choices and assian a

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5GZ
icon
Related questions
icon
Concept explainers
Question
Rock Paper Scissors Lizard Spock (RPSLS) is an extended version of the classical game of chance Rock Paper Scissors. This game is created by Sam Kass and Karen Bryla. In
this game, the players pick one of the following variables: rock, paper, scissors, lizard, spock. The outcome of the game is determined by the rules below specifying which
variable defeats the other. If both players choose the same variable, the game ends in a draw.
Rules:
• scissors cut paper
• paper covers rock
• rock captures lizard
• lizard poisons spock
• spock smashes scissors
• scissors captures lizard
• lizard eats paper
• paper disproves spock
• spock vaporizes rock
• rock crushes scissors
In this project, you will write a program that takes two strings representing the choices of the players as inputs and prints the outcome of the RPSLS game. There are three
possible outcomes of this game: a tie, a win for player 1 and, a win for player 2. You are supposed to determine the outcome depending on the players' choices and assign a
Transcribed Image Text:Rock Paper Scissors Lizard Spock (RPSLS) is an extended version of the classical game of chance Rock Paper Scissors. This game is created by Sam Kass and Karen Bryla. In this game, the players pick one of the following variables: rock, paper, scissors, lizard, spock. The outcome of the game is determined by the rules below specifying which variable defeats the other. If both players choose the same variable, the game ends in a draw. Rules: • scissors cut paper • paper covers rock • rock captures lizard • lizard poisons spock • spock smashes scissors • scissors captures lizard • lizard eats paper • paper disproves spock • spock vaporizes rock • rock crushes scissors In this project, you will write a program that takes two strings representing the choices of the players as inputs and prints the outcome of the RPSLS game. There are three possible outcomes of this game: a tie, a win for player 1 and, a win for player 2. You are supposed to determine the outcome depending on the players' choices and assign a
In this project, you will write a program that takes two strings representing the choices of the players as inputs and prints the outcome of the RPSLS game. There are three
possible outcomes of this game: a tie, a win for player 1 and, a win for player 2. You are supposed to determine the outcome depending on the players' choices and assign a
corresponding value to the variable result. We have already provided you with the input and output statements. DO NOT CHANGE THESE STATEMENTS.
Assume that the inputs (i.e. the choices of the players) are:
• in lowercase. You don't need to check the inputs for case sensitivity.
• valid which means the allowed choices are only the five variables of the game (i.e. rock, paper, scissors, lizard, spock). You don't need to check the validity of the inputs.
Input
Output
rock spock
Player 2 wins! spock defeats rock
lizard paper
Player 1 wins! lizard defeats paper
spock spock
It's a tie!
Transcribed Image Text:In this project, you will write a program that takes two strings representing the choices of the players as inputs and prints the outcome of the RPSLS game. There are three possible outcomes of this game: a tie, a win for player 1 and, a win for player 2. You are supposed to determine the outcome depending on the players' choices and assign a corresponding value to the variable result. We have already provided you with the input and output statements. DO NOT CHANGE THESE STATEMENTS. Assume that the inputs (i.e. the choices of the players) are: • in lowercase. You don't need to check the inputs for case sensitivity. • valid which means the allowed choices are only the five variables of the game (i.e. rock, paper, scissors, lizard, spock). You don't need to check the validity of the inputs. Input Output rock spock Player 2 wins! spock defeats rock lizard paper Player 1 wins! lizard defeats paper spock spock It's a tie!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT