This project keeps track of players and matches for a swiss style tournament. A tournament database with a player and match table is created. Players are entered into the player table and are matched according to their standings. Results of matches are entered into the match table.
- tournament.sql This files contains sql statements that drops existing tables/views and creates new ones.
- tournament.py This file contains fuctions used in swiss style tournament.
- tournament_test.py This file contains test data to test run the tournament.
#Instructions
- Install Vagrant https://www.vagrantup.com/
- Install Virtual Box https://www.virtualbox.org/
- Clone the fullstack-nanodegree-vm repository https://github.com/udacity/fullstack-nanodegree-vm
- In cmd run
vagrant up
thenvagrant ssh
commands - Change directory by running
cd /vagrant/tournament
- Run
psql
in the cmd - Create tournament database by typing and running
CREATE DATABASE tournament;
- Connect to tournament database by running
\c tournament;
- Create tables/views by typing and running
\i tournament.sql
- Run
\q
to exit psql mode - Run
python tournament_test.py
to run through tournament test.