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
Built Distribution
File details
Details for the file primer-coin-game-1.0.3.tar.gz
.
File metadata
- Download URL: primer-coin-game-1.0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fff641ad4abc9427843e0c515f64ea66c70046877c9250ebf8afbd5b1404218 |
|
MD5 | 8f849b1290d5b2d6506ddc91992dbe9b |
|
BLAKE2b-256 | 20d76d52c64dd3f3137f7e5cb0425fad1d8b3bbc99959988c04311c0078e1db3 |
File details
Details for the file primer_coin_game-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: primer_coin_game-1.0.3-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5fad0e8867658788655d8cf0a403e36d915a8e33bf7d2cbfc7ce7902093018f |
|
MD5 | 33bddc27b3a3b3ac505dd33e4e201fed |
|
BLAKE2b-256 | 17261016c020032d1314c28b4c9d2513093004deb145e54cecf1da9df8fac9ae |