A demo that 'calculates' the winning poker hand between 2 players through algorithms. This is the Python version of:
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Probably needed: Getting Started with Python in VS Code.
It requires no other installation than having Python 3 latest stable release (3.7.3 by this date).
-
Visual Studio Code was the code editor harnessed for this, it requires extensions from Python - https://marketplace.visualstudio.com/items?itemName=ms-python.python, and I essentially used Python Extension Pack.
-
Pipenv was used to setup and manage virtual environments and packages installations.
-
Pytest, for testing. Helpful: Python unit testing in Visual Studio Code.
The process is simple, once is run, it will ask for the pokerdata.txt source directory and then, for the target directory (pokerdata.txt was added as an example for file format).
Unit tests are included.
These other articles might be helpful: How to manage your Python projects with Pipenv and Migrating from pip + virtualenv to Pipenv.
About Pipenv, if you want your virtual environment to be created inside your project, execute this command using shell/bash before pipenv install [--dev]
:
export PIPENV_VENV_IN_PROJECT=1
There may be some complications cause of Python Extension, such as unresolved imports or else. So, this options in the generated settings.json file could be helpful:
"python.analysis.disabled": [
"unresolved-import",
"undefined-variable"
]
For linting: Pylint, Flake8 and PEP 8 were used.
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pep8Enabled": true
For testing matters: Pytest.
"python.testing.pyTestEnabled": true
And for autoformatting: autopep8.
Other ways to run/debug is up to you.
- Renzo S. - Final work - mr-wolf-rsh
All sorts of suggestions are welcome. This has academic purposes only.
This project is licensed under the GNU General Public License v3.0.