Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Monkey fools Ninja Monkey unplugs Robot Robot chokes Ninja Robot crushes Zombie Pirate drowns Robot Pirate skewers Monkey Ninja karate chops Pirate Ninja decapitates Zombie
Monkey fools Ninja Monkey unplugs Robot Robot chokes Ninja Robot crushes Zombie Pirate drowns Robot Pirate skewers Monkey Ninja karate chops Pirate Ninja decapitates Zombie Zombie eats Pirate Zombie savages Monkey Nobody wins
Write an algorithm and code for your application based on the above description. Make sure the output matches the sample above.
Use Computer Science I with arrays, not Computer Science II or higher
Sample Here's a sample game play. User input in bold Note: The prompt to enter a valid choice should repeat until the user has entered a valid choice, not just once. Player 1 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Invalid choice, Player 1. Enter a number 1-5: Player 2 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Invalid choice, Player 2. Enter a number 1-5: Monkey fools Ninja. Player 1 wins! Would you like to play again? 2 yes Player 1 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Player 2 enter a number 1-5 for Monkey, Robot, Pirate, Ninja, or Zombie: Zombie eats Pirate. Player 2 wins! Would you like to play again? no GAME OVERStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started