A small console program that simulates games of rock paper scissors.
You need pip
, as well as pipenv
.
If you don't yet have pipenv
, first run:
$ pip install pipenv --user
For more information, see the pipenv
installation documentation.
If only running the program, you should be able to install it like this:
$ pipenv shell
$ pipenv install
If looking to also develop, you will want to include the development dependencies in the package install, like so:
$ pipenv install --dev
Once installed, you should be able to run it with:
$ python ./rps-sim.py
You can specify the number of games that should be played via the --games
option, e.g.:
$ 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.:
$ python ./rps-sim.py --p1-strategy 'sequence'
Run python ./rps-sim.py --help
for a complete list of options
Assuming you have an active pipenv
shell:
$ pytest