The Chess Tournament Manager is a Python-based application that helps manage chess tournaments. It allows users to create tournaments, add players, manage rounds and matches, and archive tournament and player data. The project follows an MVC (Model-View-Controller) architecture to separate business logic, data presentation, and user interaction control.
- Create a Tournament: Initialize a new tournament with a name, location, date, and description.
- Add Players: Add players to the ongoing tournament or archive them if no tournament is in progress.
- Manage Matches: Generate matches for each round, record match results, and update player scores.
- Load a Tournament: Load an unfinished tournament from the archive to resume it.
- Display Archived Data: View archived players and tournaments, as well as details of players and rounds for a specific tournament.
- Update Player's National Chess ID: Modify the national chess ID of an archived player.
- Python 3.x must be installed on your machine.
-
Clone the GitHub repository:
git clone https://github.com/your-username/chess-tournament-manager.git cd chess-tournament-manager -
(Optional) Create a virtual environment for the project:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required dependencies (if any):
pip install -r requirements.txt
-
Run the application:
python controller.py
-
Follow the on-screen instructions to navigate through the menu options.
-
You can create new tournaments, add players, start and manage tournaments, and view or modify archived data.
- models/: Contains the data models for the tournament, player, turn, and match.
- views/: Contains the view classes that handle user interaction and data presentation.
- controller.py: The main controller that ties together the models and views to manage the application's workflow.
- README.md: This file.
To maintain code quality and adhere to PEP 8 standards, you can generate a Flake8 report for the project. Flake8 is a tool for checking the style guide enforcement of your Python code.
-
Install Flake8 if you haven't already:
pip install flake8
-
Navigate to the project directory where
controller.pyis located. -
Run the following command to generate a Flake8 report, with a maximum line length of 119 characters, and save the output to a file:
flake8 --max-line-length=119 controller.py --output-file=flake8_report_controller.html
-
The report will be saved in
flake8_report_controller.html, detailing any style violations found incontroller.py.
You can repeat this process for other files in the project by replacing controller.py with the desired file name.
- Tournaments and players are saved in JSON format to files named
archived_tournaments.jsonandarchived_players.jsonrespectively. - When a tournament is created or a player is added, their data is automatically saved to these files.
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes.
This project is free of any kind of licence.
Thanks to all contributors and anyone who provided feedback or assistance in the development of this project.