https://github.com/andrewadev/rps-sim
A sort of rock, paper, scissors simulator.
https://github.com/andrewadev/rps-sim
rock-paper-scissors rps-game simulation
Last synced: 5 days ago
JSON representation
A sort of rock, paper, scissors simulator.
- Host: GitHub
- URL: https://github.com/andrewadev/rps-sim
- Owner: AndrewADev
- License: mit
- Created: 2019-12-01T13:13:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2026-02-12T17:31:57.000Z (4 months ago)
- Last Synced: 2026-02-13T01:09:34.500Z (4 months ago)
- Topics: rock-paper-scissors, rps-game, simulation
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RPS Sim
A small console program that simulates games of rock paper scissors.
## Installing
You need `pip`, as well as `pipenv`.
### Prerequisite: `pipenv`
If you don't yet have `pipenv`, first run:
```shell
$ pip install pipenv --user
```
For more information, see [the `pipenv` installation documentation](https://pipenv.pypa.io/en/latest/installation/).
### Installing RPS Sim
If only running the program, you should be able to install it like this:
```shell
$ pipenv shell
$ pipenv install
```
If looking to also develop, you will want to include the development dependencies in the package install, like so:
```shell
$ pipenv install --dev
```
## Running
Once installed, you should be able to run it with:
```shell
$ python ./rps-sim.py
```
You can specify the number of games that should be played via the `--games` option, e.g.:
```shell
$ python ./rps-sim.py --games 7
```
You can specify the strategy that a player will use via the `--p1-strategy`/`--p2-strategy` option, e.g.:
```shell
$ python ./rps-sim.py --p1-strategy 'sequence'
```
Run `python ./rps-sim.py --help` for a complete list of options
## Tests
Assuming you have an active `pipenv` shell:
```shell
$ pytest
```