Swiss Pairing Tournament Results is a database schema used to store game matches between players participating in multiple tournaments in the Swiss Tournament Style. This project is written in Python and PostgreSQL.
This is a project for the lovely folks at Udacity, submitted for review by Rupert Ong, who is completing the Fullstack Web Developer Nanodegree.
Here's what you need to do to view this project:
- Install Vagrant and VirtualBox.
- Within Terminal (Mac), navigate to the vagrant folder and launch the Vagrant VM by running the command
vagrant up
. - SSH into the running Vagrant machine
vagrant ssh
. - Execute
cd /vagrant/tournament
to change directory. - Execute
psql
and then execute\i tournament.sql
to import the database.\quit
to exit PostgreSQL. - Execute
python tournament_test.py
to run the test suite.
Within the downloaded files, this is the relevant structure:
fullstack-nanodegree-vm/
└── vagrant/
├── Vagrantfile
└── pg_config.sh
└── tournament/
├── tournament.py
├── tournament_test.py
└── tournament.sql
- If there is an odd number of players, assign one player a “bye” (skipped round). A bye counts as a free win. A player should not receive more than one bye in a tournament.
- When two players have the same number of wins, rank them according to OMW (Opponent Match Wins), the total number of wins by players they have played against.
- Support games where a draw (tied game) is possible.
- Support more than one tournament in the database, so matches do not have to be deleted between tournaments.
Rupert Ong
Code and documentation copyright 2011-2016 Udacity Inc. All rights reserved.