* This is a Python application that uses PostgreSQL database to keep track of players
and matches in a swiss game tournament.
-
Install Vagrant and VirtualBox
-
Clone the
fullstack-nanodegree-vm repository
-
Clone https://github.com/orangegirl85/udacity_p2_tournament_results repository into fullstack/vagrant/tournament_nico
- Launch the Vagrant VM
vagrant up
vagrant ssh
- Navigate to tournament_nico folder:
cd /vagrant/tournament_nico
- Import tournament.sql in order to create the database, the tables and the views for the project:
psql
\i tournament.sql
- Connect in other terminal tab to the virtual machine
vagrant ssh
- Navigate to tournament_nico folder:
cd /vagrant/tournament_nico
- Run app
python tournament_test.py
-
Intro to Relational Databases - Udacity course
-
find_path
inspired byhttps://www.python.org/doc/essays/graphs/
- Project Structure
/tournament_nico
.gitignore
Readme.md
tournament.py
tournament.sql
tournament_test.py
-
Used unittest for testing Tournament App.
-
Prevent Rematches Functionality
-
Added generate_whole_swiss_tournament in tournament_test.py
The algorithm for determining the swiss_pairings is not optimal.
The optimal next matches between players with equal or nearly-equal win record
should be determined in find_path
not _get_next_matches_ids
.