Skip to main content

Python implementation of the Primer coin flip game

Project description

Python Implementation of Primer Coin Game

Python implementation of Primer's Coin Game which can be used for testing and simulations. To find out more about the game see Primer's video and try the original game.

Getting Started

Dependencies

To run the simulator you just need Python 3.6+ installed.

Installing

Go to https://www.python.org/ for instruction how to install Python on your machine. The package can be found on PyPi so you can use pip to install the package:

# python -m pip install --upgrade primer-coin-game

Another way to install it is by manually cloning the repo. To clone you can use:

# git clone https://github.com/ErikKarlen/primer-coin-game-python.git

Executing program

Try running the example simulator in a terminal, e.g using:

# cd primer-coin-game-python
# python simulate.py

It will simulate the game many times using the generate_action function to determine what to do in different cases and finally print the max score it managed to get. Feel free to try and implement your own generate_action function to see if you can make it more efficient and get a higher score.

Authors

Erik Karlén

Version History

  • 1.0
    • Initial working game and simulator

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledegments

  • Primer - Thanks for creating the original game and making awesome videos!

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

primer-coin-game-1.0.3.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

primer_coin_game-1.0.3-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

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