PING PONG CHAMPIONSHIP
Dependencies
- cherrypy
To install the dependencies: '''pip install -r requirements.txt'''
To start the application: '''python app.py'''
The server runs on the default port of 5000. To hit any api from the local system after starting the system: localhost:5000/api_routes
The app is hosted in HEROKU. It can also be accessed through https://ping-pong-ping.herokuapp.com
List of General APIs available
- /api/getplayers Gets the list of players available for the game.
- /api?getplayers?id=1 Gets the player details for the particular player id.
- /api/starttournament Start the tournament among the player orchestrated by the referee and returns the results of the game.
- /api/report Generates the report for all the tournament held.
To play a game by user
- /api/createnewtournament
- /api/registerplayers
- /api/registerreferee
- /api/getplayers
- /api/startmatch?player1=Joey&player2=Nick
- /api/winnerslist
- /api/getremainingplayers
- /api/currentwinner
The start match has to be called multiple times among players and also between winners
MISC
- /api/addplayer?no=1&name=Jack&defence_set_length=6
TODO
- /api/dropplayer
- /api/configuregame
- Make all the games run concurrently using multithreading.
- Persist the scores of the players.
- Write test cases.
- Implement authentication.