Skip to content

An attempt on a prototype of a simple terminal-based version of the great card game Carta Mayor.

License

Notifications You must be signed in to change notification settings

Matbbastos/carta-mayor-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carta Mayor Prototype

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.


Local

For a local version of the application, follow:

Repo and Dependencies

# create dir
# eclone repo
# go to dev branch
# start virtualenv
# install dependencies
# set env vars

Execution

# 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

Unit Tests

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'

Commits

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.

About

An attempt on a prototype of a simple terminal-based version of the great card game Carta Mayor.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages