Skip to content

Offline terminal application to manage chess tournaments (student project)

Notifications You must be signed in to change notification settings

nanakin/Chess-tournament-OC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Tournament Manager

Preamble

This script was designed for a school project with specific requirements and fixed constraints. It was developed in a limited period of time and in this context this project is not intended to evolve that much once "finished". This project is not open to contribution. The following need is fictive.

About The Project

logo

Project context

A friend of mine is a chess club member. The club is dealing with chess tournaments manually. They would like an offline app to manage their tournaments.

About the application features

The application implements the following features:

  • add new players,
  • register them to tournaments,
  • create tournaments (date, location, number of rounds),
  • launch automated and optimal matchmaking,
  • start rounds,
  • register matches score,
  • display reports (list of tournaments, players, matches, etc.) and export them to files,
  • and others.

About the application design

The application :

  • is designed using the architectural pattern Model-View-Controller to have a clear separation between the code manipulating data (model) and the one for the user interface (view).
  • is solving a SAT-CP* model defined by the matchmaking constraints with ortools. (SAT-CP solver = A Constraint Programming (CP) solver that uses satisfiability (SAT) method.)
  • is displaying a pretty and interactive command line user prompt with questionary.
  • is loading previous data from JSON files and is doing automatic backup (after each model change). The application does not require internet to work.
  • is flake8 compliant.

Screenshots

Tournament registration:

tournament-registration

Tournament management menu:

Screenshot 2023-04-13 at 17 06 57

Technology

python

This project is using Python. This application was tested with 3.11 version (and pip 23.0) on Windows, linux and macOS.

Third-party dependencies are : questionary, ortools and optionally flake8-html (not required by the application).

Installation

  1. Clone this repository:
    git clone https://github.com/nanakin/OC-P4-chess-tournament.git chesstournament
  2. Move to the project directory:
     cd chesstournament
  3. Create a virtual environment (optional):
    python3 -m venv venv
    and activate it:
    .\venv\Scripts\activate  # windows
    source venv/bin/activate  # unix and macOS
  4. Install required packages:
    pip install -r requirements.txt

Usage

To launch the Chess Tournament Manager

python3 main.py

Option

--data-path to specify a backup path.

To verify flake8 compliance

flake8 --max-line-length=119 --format=html --htmldir=flake8_rapport --exclude=venv