From d77ea299a2f3ab006d01157ecf262b38b1694a42 Mon Sep 17 00:00:00 2001 From: SUDEEP M SHETTY <86517389+SUDEEP-M-SHETTY@users.noreply.github.com> Date: Sun, 7 Apr 2024 06:36:01 +0000 Subject: [PATCH] Added a more descriptive README file. --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42d73a1..e2ce1d4 100644 --- a/README.md +++ b/README.md @@ -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**. \ No newline at end of file +# 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. \ No newline at end of file