As part of the Openclassrooms Python software developer program, this project focuses on the use of the Model-View-Controller design pattern.
- Python3
- Pip3 (If Python3 is installed, you can install pip3 with
python -m pip3 install
)
The dependencies and their versions are listed in the requirements.txt
but mainly, it requires:
- tinydb
- flake8
- Clone or download the content of this repository
- (
⚠️ Please make sure you're in the right directory for the next steps) - Create your environment with
Python3 -m venv env
(the recommended name is env) - Activate your environement with
source env/bin/activate
- Install the dependencies for your environment with
pip3 install -r requirements.txt
- Make sure you're in the right folder then launch
main.py
by writing in your terminalpython3 main.py
To generate a flake8 report in HTML format, write flake8 --format=html --htmldir=flake-report
in your terminal, the report will generate itself in a flake-report directory.
- Select option 2 "Gérer la base de données de joueurs"
- Create a player with option 1 "Créer un joueur"
- The created player will be saved in the database "db_players.json"
- Select option 1 "Gérer les tournois"
- Create a tournament with option 1 "Créer un nouveau tournoi"
- After creating a tournament, select ("Gérer les tournois" ->) "Continuer un tournoi"
- Load your tournament
- Create a new round with option 1 ("Gérer les tournois" ->) "Créer un nouveau round"
- After creating a round, the players will be paired together in matches
- Select ("Gérer les tournois" -> "Continuer un tournoi" ->) "Entrer les scores du round en cours" and score the matches
- You can consult tournament reports and the player database from the main menu with option 3 "Consulter les rapports"