Skip to content

AndrewADev/rps-sim

Repository files navigation

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:

$ pip install pipenv --user

For more information, see the pipenv installation documentation.

Installing RPS Sim

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

Running

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

Tests

Assuming you have an active pipenv shell:

$ pytest

About

A sort of rock, paper, scissors simulator.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages