luisofribeiro / tournament

Udacity Full Stack developer project 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tournament Results

https://www.udacity.com/course/viewer#!/c-ud197-nd/
Udacity Full Stack developer project 2

Project Specification

Develop a database schema to store details of a games matches between players.
Then write a Python module to rank the players and pair them up in matches in a tournament.

Files

tournament.py

Contains the implementation for the Swiss tournament

tournament.sql

Contains the SQL queries to create the database, tables and views

tournament_test.py

Contains the test cases for tournament.py

Prerequisites

The latest vagrant build for the Udacity tournament project. (In project notes)

Instructions

  1. Start Vagrant
  2. Open Terminal or cmd and browse to the vagrant folder
  3. Type vagrant up
  4. SSH in to the vagrant VM
  5. In the same terminal type vagrant ssh
  6. Change to the correct folder
  7. Type cd /vagrant/tournament
  8. Open PSQL and run the tournament.sql
  9. type psql
  10. copy the contents of tournament.sql and paste in to the terminal window
  11. type \q to quit out of PSQL
  12. Run the tests
  13. In the terminal type python tournament_test.py

Expected Outcome

Success! All tests pass!
vagrant@vagrant-ubuntu-trusty-32:/vagrant/tournament$ python tournament_test.py

  1. Old matches can be deleted.
  2. Player records can be deleted.
  3. After deleting, countPlayers() returns zero.
  4. After registering a player, countPlayers() returns 1.
  5. Players can be registered and deleted.
  6. Newly registered players appear in the standings with no matches.
  7. After a match, players have updated standings.
  8. After one match, players with one win are paired.
    Success! All tests pass!

Extra Credit

If the top two players have the same won match count, and have won more than 0 games, then the standings is ordered by total number of wins by games played in descending order.

About

Udacity Full Stack developer project 2


Languages

Language:Python 100.0%