An attempt on a prototype of a simple terminal-based version of the great card game Carta Mayor.
This version is supposed to be used in a single terminal, allowing for players to play by "switching seats" to access the terminal. Not practical, but the actual intent is to validate the structure of the game's mechanics, ensuring the rules are enforced and correct and sufficient information is displayed at each stage of the match.
For a local version of the application, follow:
# create dir
# eclone repo
# go to dev branch
# start virtualenv
# install dependencies
# set env vars
# run the thing
If you'd like to see the logs during the execution, use the following in a new terminal:
tail -f logs/info.log # -f provides live feed of the file
tail -fn 20 logs/debug.log # -n sets the amount of lines to show
The application is tested using pytest
and the tests are all grouped under the tests directory.
In order to execute the available tests, use the following (from the root directory of the project):
python -m pytest tests/ # executes all available tests
python -m pytest tests/test_card.py # executes the tests in 'test_card.py'
python -m pytest tests/test_card.py::test_card_playability # executes only 'test_card_playability' from 'test_card.py'
When committing to this repository, following convention is advised:
- chore: regular maintenance unrelated to source code (dependencies, config, etc)
- docs: updates to any documentation
- feat: new features
- fix: bug fixes
- ref: refactored code (no new feature or bug fix)
- revert: reverts on previous commits
- test: updates to tests
For further reference on writing good commit messages, see Conventional Commits.