Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a more descriptive README file. #13

Open
wants to merge 1 commit into
base: solution
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# Challenge project - Build a minigame console app with GitHub Copilot

Starter and Final code for the Challenge project: "Challenge project - Build a minigame console app with GitHub Copilot". To check the solution, change the branch to **Solution**.
# Rock Paper Scissors Game

This Python script allows you to play the classic game of Rock Paper Scissors against the computer. The game continues until the user decides to stop playing.

## How to Play

1. Run the Python script.
2. Enter your choice (rock, paper, or scissors) when prompted.
3. The computer will randomly select its choice.
4. The winner of the round will be determined based on the choices.
5. You can choose to play again or exit the game.

## Implementation Details

- The script imports the `random` module to enable random selection of the computer's choice.
- It defines a list `options` containing the possible choices: "rock", "paper", and "scissors".
- Variables `score` and `rounds_played` are initialized to keep track of the player's score and the number of rounds played.
- The game is played in a `while` loop, which continues until the player decides to stop.
- After each round, the result is printed, and the score and rounds played are updated accordingly.
- If the player inputs an invalid choice, they are prompted to enter a valid one.
- After each round, the player is asked if they want to play again. If not, the game displays the final score and the number of rounds played.

## License

This script is open-source and available under the MIT License. Feel free to modify and distribute it according to your needs.