Skip to content

KevWritesCode/Rock-Paper-Scissors-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Rock-Paper-Scissors-Game

A simple branching game of rock, paper, scissors built using Python 3.x

Technologies Used:

  • Python 3.11.1

Description:

The Rock, Paper, Scissors game is a simple game that allows users to play against the computer by choosing one of the three options - rock, paper, or scissors. The game is implemented using Python 3.11.1 and uses a while loop to allow the user to play multiple rounds until they decide to exit.

Key Parts of the Code:

  • options list: This list contains the three options that the user can choose from - rock, paper, or scissors.
  • while loop: This loop allows the user to play multiple rounds of the game until they decide to exit by typing 'exit'.
  • if-elif-else block: This block is used to determine the winner of each round based on the user's and the computer's choices.
  • player_wins and cpu_wins variables: These variables are used to keep track of the number of wins for the player and the computer, respectively.

Design Decisions:

The design of the Rock, Paper, Scissors game was kept simple for ease of use. The user interface is minimal, consisting of instructions and prompts for the user's choice. The user can enter their choice of rock, paper, or scissors and the game will determine the winner of each round.

The choice to use a while loop was made to allow the user to play multiple rounds without having to restart the application each time. The if-elif-else block is used to determine the winner based on the user's and the computer's choices.

Reflection:

Working on the Rock, Paper, Scissors game was a fun and educational experience. I was able to apply my knowledge of Python to build a simple but functional game. One of the challenges I faced was ensuring that the game would be fair and balanced, but I was able to overcome this by using random.choice to generate the computer's choice.

I learned that even simple games like this can be entertaining and engaging, and that they can also serve as a foundation for more complex projects. Additionally, I learned the importance of designing the user interface to be simple and intuitive.

About

A simple branching game where the player has two options to choose from and the game ends based on their choice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages