Question: THE FOLLOWING PROGRAM SHOULD ONLY BE WRITTEN IN PHP and should use an ARRAY. Create a game Rock, Paper, Scissors, Lizard, Spock or RPSLS for
THE FOLLOWING PROGRAM SHOULD ONLY BE WRITTEN IN PHP and should use an ARRAY. Create a game "Rock, Paper, Scissors, Lizard, Spock" or RPSLS for short.
The gameplay should have an option for the user to pick then be played against a random computer choice. The result should print out the winner and the phrase associated with the win. It should also keep track of total games played and total wins of both the player and computer.
Here are the phrases that should be printed depending on who wins each round (for example if user picks scissors and computer picks paper output would be "USER wins! Scissors cuts Paper" :
Scissors cuts Paper
Paper covers Rock
Rock crushes Lizard
Lizard poisons Spock
Spock smashes Scissors
Scissors decapitates Lizard
Lizard eats Paper
Paper disproves Spock
Spock vaporizes Rock
Rock crushes scissors
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
