Skip to main content

A simple Rock, Paper, Scissors game.

Project description

CI / CD

Rock Paper Scissors Game

A simple, interactive Rock, Paper, Scissors game implemented in Python. This package allows users to play against the computer or simulate a game between two computer-controlled players. The package also includes a scoreboard that the user can reset at will, and a tutorial to teach you how to play.

Installation

You can install the Rock Paper Scissors game using pip: pip install rockpaperscissors2333

Usage

To use our game, simply import the package and select a number option from the list that appears!

Code Examples

example

Documentation

This package includes the following functions:

In "main.py", the "main" allows you to select an option for what function you want to access in the game. If an invalid option is selected, it will let you know.

In "cli.py":

A function "play()" for allowing the player to play against the computer. It prompts a user input for their move and provides a computer move, then compares the two and lets you know who won, updating the scoreboard.

A function "simulate()" for allowing the player to simulate a game between two computer players. It provides two computer moves, and offers the same comparison.

A function "tutorial()" which includes print statements that explain how the game works to the user.

In "game.py":

A function "determine_winner()" takes in the player's choice and the computer's choice. It completes the logic required for play() to select a winner between the two by returning the winner.

"generate_computer_choice()" allows for geenration of a random option from the computer between "rock," "paper," and "scissors".

"update_scoreboard()" takes the winner from determine_winner() and, depending on who it was, adds a win to the scoreboard for either the player or the computer.

"reset_scoreboard()" clears the scoreboard.

For the contribution:

You can setup the virtual environment by starting with pipenv install

And then install all the dependences through pipenv install

Then you could active the virtual environment through pipenv shell

Then you can build and test the packages inside the virtual environment.

Teammates

Zijie Zhao (github), Nathan Daniel (github), Ellis Pinsky (github), Kevin Li (github)

PyPI page

rockpaperscissors2333

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rockpaperscissors2333-1.1.1.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rockpaperscissors2333-1.1.1-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file rockpaperscissors2333-1.1.1.tar.gz.

File metadata

  • Download URL: rockpaperscissors2333-1.1.1.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for rockpaperscissors2333-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f7b633b71d2644eaf5977a8fbe7a70eb5b67132cf2110d09e7c2a44b2b61afb9
MD5 1becbe7d88096cfc83326a60b37ceb3a
BLAKE2b-256 c2232854054c7093c1ee6570a49fd39eddb1b4a5388775494da5ea4918ef89e5

See more details on using hashes here.

File details

Details for the file rockpaperscissors2333-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rockpaperscissors2333-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 213fb75e1ca8bc7f265082668a11b588c52f372c357b46f6d62949f80e4aa464
MD5 a959bfe1654b01366c0d22d922ee0edb
BLAKE2b-256 c844ebda511512cccd85156e46298e9c9f1a941424dbfbdc6cb49f616c92852d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page