A very simple card game
JJC's Card Game
This is a simple card played over a series of round. Each round, players draw one card. The player with the highest card received 2 points. Players with penalty cards lose a point. First player to 21 points wins.
Make sure you have python 3.6 or higher installed, then:
pip install jjc-card-game
Then follow the on-screen rules and instructions.
Or try these more advanced options:
jjc-card-game -d Jonathan Nicholas Austinto play a game with these three players. The
-dspeeds up gameplay by dealing all the cards at once.
jjc-card-game --helpto see even more options
Development tools: Windows 10, PowerShell, and PyCharm.
git clone https://github.com/jonathanchukinas/card_game.git cd card_game pip install flit # for build, packaging python -m venv .venv # create virtual environment .venv\scripts\activate # activate virtual environment flit install --pth-file # set up editable install # modify source code jjc-card-game # run modified app # repeat deactivate # exit virtual environment
Running the tests
Test are written for
pytest and automated by
Game logic has 95% test coverage, while
the command-line interface / ouput has less than 50%.
To run all the tests:
pip install tox, pytest cd path\to\project\directory tox
Tests will be run against all these python versions, if you have them:
For a faster way to run tests:
python and python packages:
- Jonathan Chukinas - initial release
This project is licensed under the MIT License - see the LICENSE.md file for details
- Brian Okken for his Test & Code podcast and Python Testing with pytest book, which jump-started my testing knowledge early in 2019 and recently helped me integrate pytest, flit, and tox together.
- Luciano Ramalho for his outstanding Fluent Python, which taught me much of what I know about python under the hood, dunder methods, lru cache, and so much more.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size jjc_card_game-0.0.3-py3-none-any.whl (20.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size jjc-card-game-0.0.3.tar.gz (11.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for jjc_card_game-0.0.3-py3-none-any.whl