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!
Release files for primer-coin-game 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| primer-coin-game-1.0.3.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| primer_coin_game-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / primer-coin-game-1.0.3.tar.gz
| Download URL | primer-coin-game-1.0.3.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fff641ad4abc9427843e0c515f64ea66c70046877c9250ebf8afbd5b1404218
|
|
BLAKE2b-256 checksum How to use checksums |
20d76d52c64dd3f3137f7e5cb0425fad1d8b3bbc99959988c04311c0078e1db3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / primer_coin_game-1.0.3-py3-none-any.whl
| Download URL | primer_coin_game-1.0.3-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5fad0e8867658788655d8cf0a403e36d915a8e33bf7d2cbfc7ce7902093018f
|
|
BLAKE2b-256 checksum How to use checksums |
17261016c020032d1314c28b4c9d2513093004deb145e54cecf1da9df8fac9ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|