Skip to content

irsol/Tournament-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tournament Planner

A Python module that uses the PostgreSQL database to keep track of players and matches in a game tournament.

The game tournament will use the Swiss system for pairing up players in each round: players are not eliminated, and each player should be paired with another player with the same number of wins, or as close as possible.

Prerequisites

This projects requires Vagrant virtual machine and cloned fullstack-nanodegree-vm repository, which comes with Python 2.7, psycopg2 and PostgreSQL pre-installed.

Project structure

Inside the tournament directory in Vagrant VM in folder /vagrant/tournament you'll find the following files:

  • tournament.py
  • tournament.sql
  • tournament_test.sql
  • README.md

Usage

  1. First we need to start Vagrant and connect to the VM by using following commands:
vagrant up
vagrant ssh
  1. Open a folder the project:

cd /vagrant/tournament/

  1. Create a database and all necessary tables:

psql -f tournament.sql

  1. Execute unit tests:

python tournament_test.py

Successful execution will be folled by Success! All tests pass! message.