5. Roshambo. Also called Rock-Paper-Scissors, this game is the best way to solve any sort of dispute. In this game, two players count aloud to three, swinging their hand in a fist each time. On the count of three, the players "throw" one of three gestures: Rock: a clenched fist, Scissors: index and middle fingers extended and separated, and Paper: an open hand, palm down. Each gesture beats one of the others:
- Rock crushes Scissors
- Scissors cuts Paper
- Paper covers Rock
If both players pick the same gesture, the round is a draw and they must throw again. Your task is to have a user play Roshambo against a computer opponent that randomly picks a throw. You will ask the user how many points are required to win the game. Roshambo is composed of rounds, where the winner of a round scores a single point. The user and computer play the game until the desired number of points is reached. Within a round, if the user picks the same throw as the computer, prompt the user to throw again and generate a new throw for the computer. When there is a tie, the computer and user continue throwing until there is a winner.
Example:
ROCK PAPER SCISSORS in Python 2 Rules:
1) Rock wins over Scissors
2) Scissors wins over Paper
3) Paper wins over Rock.
How many points does it take to win?
***********ROUND 1******
Pick your throw: [r]ock, [p]aper, or [s]cissors?
Computer threw rock, you lose!
Your score: 0
Computer's score: 1
************ROUND 2****
Pick your throw: [r]ock, [p]aper, or [s]cissors?
Computer threw scissors, you win!
Your score: 1
Computer's score: 1
************ROUND 3****
Pick your throw: [r]ock, [p]aper, or [s]cissors?
Computer threw scissors, you tie!
Your score: 1
Computer's score: 1
************ROUND 4****
Pick your throw: [r]ock, [p]aper, or [s]cissors?
Computer threw paper, you lose!
Your score: 1
Computer's score: 2
*********************GAME OVER*********************
Computer wins!