https://github.com/allenkeys/rps-python
Using local python packages to build a simple CLI rock-paper-scissors game. Rock-Paper-Scissors is a simple two-player game where, at a signal, players make figures with their hands, representing a rock, a piece of paper, or a pair of scissors. The winner is determined according to a set of rules. You can find the official rules under the resources.
https://github.com/allenkeys/rps-python
Last synced: 10 months ago
JSON representation
Using local python packages to build a simple CLI rock-paper-scissors game. Rock-Paper-Scissors is a simple two-player game where, at a signal, players make figures with their hands, representing a rock, a piece of paper, or a pair of scissors. The winner is determined according to a set of rules. You can find the official rules under the resources.
- Host: GitHub
- URL: https://github.com/allenkeys/rps-python
- Owner: Allenkeys
- Created: 2022-05-31T12:16:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-01T16:46:00.000Z (over 3 years ago)
- Last Synced: 2025-01-23T19:36:58.940Z (11 months ago)
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Creating and Using [Local] Python Packages
---
## A simple CLI [Rock-Paper-Scissors] game
**[Rock-Paper-Scissors]**
---
Rock-Paper-Scissors is a simple two-player game where, at a signal, players make figures with their hands, representing a rock, a piece of paper, or a pair of scissors. The winner is determined according to a set of rules. You can find the official rules under the *resources*.
---
In this simple version, one player will be controlled by the computer and the other player controlled by you - the users (i.e CPU vs Player).
The inbuilt Python module **random** and it's method **choice** is used to get a random value from the computer.
Check both moves and declare the winner.
**Resources:**
1. [Rock paper scissors - Wikipedia ](https://en.wikipedia.org/wiki/Rock_paper_scissors)
2. [Introduction to Python Modules](https://www.youtube.com/watch?v=uoVUOTPL9Rw&list=PLxuUHF3OiqfWAITD4gPUHZ1GcYRqmyF7P&index=26)
3. [Python random choice() function to select a random item from a List and Set](https://pynative.com/python-random-choice/)
4. [While Loops](https://www.youtube.com/watch?v=J8dkgM8Mck0&list=PLxuUHF3OiqfWAITD4gPUHZ1GcYRqmyF7P&index=19)
5. [Follow me on Twitter](https://twitter.com/JDgraay)