Skip to content

The rock-paper-scissors game developed in Python provides an entertaining way for players to compete against each other or a computer opponent. By following the rules of the game and incorporating user input, the game determines the winner and displays the results. With the option to replay, players can enjoy multiple rounds of this classic game.

Notifications You must be signed in to change notification settings

SahajG009/Rock_Paper_Scissor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Rock - Paper - Scissor

I have developed a rock-paper-scissors game in Python. The game allows two players to compete against each other by selecting either rock, paper, or scissors. The rules of the game are as follows:

1. Rock beats scissors: If one player chooses rock and the other chooses scissors, the player with rock wins.

2. Scissors beat paper: If one player chooses scissors and the other chooses paper, the player with scissors wins.

3. Paper beats rock: If one player chooses paper and the other chooses rock, the player with paper wins.

Features of the Rock-Paper-Scissors Game:

1. Player Input: The game prompts each player to input their choice (rock, paper, or scissors) through the command line interface.

2. Randomized Computer Player: If only one player is participating, the other player's choice is randomized by the computer.

3. Determining the Winner: The game evaluates the choices made by both players and determines the winner based on the rules mentioned above.

4. Displaying Results: The game displays the choices made by each player and announces the winner or a tie.

5. Replay Option: After a game is finished, players can choose to play again or exit the game.

How it Works:

1. Player Input: The game prompts the players to enter their choice (rock, paper, or scissors) one by one.

2. Randomized Computer Player: If only one player is participating, the computer randomly selects its choice (rock, paper, or scissors).

3. Determining the Winner: The game compares the choices made by the players and determines the winner based on the rules of the game.

4. Displaying Results: The game displays the choices made by each player and announces the winner or a tie.

5. Replay Option: After displaying the results, the game asks the players if they want to play again. If yes, the game starts over from step 1. If not, the game exits.

Example Gameplay:

Player 1: Please enter your choice (rock, paper, or scissors): rock

Player 2: Please enter your choice (rock, paper, or scissors): paper

Player 1 chose rock. Player 2 chose paper.

Paper beats rock. Player 2 wins!

Do you want to play again? (yes/no): ______

About

The rock-paper-scissors game developed in Python provides an entertaining way for players to compete against each other or a computer opponent. By following the rules of the game and incorporating user input, the game determines the winner and displays the results. With the option to replay, players can enjoy multiple rounds of this classic game.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages