Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/priyanshulathi/rock-paper-scissors-python

Simple Rock Paper Scissors game in Python
https://github.com/priyanshulathi/rock-paper-scissors-python

Last synced: 5 days ago
JSON representation

Simple Rock Paper Scissors game in Python

Awesome Lists containing this project

README

        

# Rock, Paper, Scissors game in Python

## Description

This is a simple command-line Rock, Paper, Scissors game written in Python. The game allows you to play against the computer, with the computer's choice being randomly generated. The game will continue to run until you decide to stop playing.

## Features

- **User Input**: Allows players to choose Rock, Paper, or Scissors.
- **Computer Choice**: Randomly generates the computer's choice.
- **Game Outcome**: Displays the outcome of each round (win, lose, draw).
- **Replay Option**: Asks the player if they want to play another round.

## Getting Started

### Prerequisites

- Python 3.x installed on your machine.

### Running the Game

1. Clone this repository to your local machine:

```bash
git clone https://github.com/PriyanshuLathi/Rock-Paper-Scissors-Python.git
```

2. Navigate to the project directory:

```bash
cd rock-paper-scissors
```

3. Run the game script:

```bash
python rock_paper_scissors.py
```

### How to Play

1. When prompted, enter your choice: `r` for Rock, `p` for Paper, or `s` for Scissors.
2. The computer will make its choice, and the result of the round will be displayed.
3. You can choose to play again or exit the game by responding to the prompt.

### Example

Enter your choice (r for Rock, p for Paper, s for Scissors):
r
You chose Rock, Computer chose Scissors.
You win!

Do you want to play again? (y/n):
n
Thanks for playing!

## Acknowledgments

- Inspired by classic Rock, Paper, Scissors gameplay.
- Python's `random` module for generating computer choices.

## Author

- Priyanshu Lathi