Simple web app to allow players of a game to anonymously pick their team. Allows players to specify a preference and then assigns each player to a team according to the rules of the game but attempting to respect everyone's preference.
Setup:
- Install Python 3.6
pip install -r requirements.txt
Run development server (should reload on code changes):
export FLASK_APP=server.py
flask run
Run production server (uses an event loop to handle multiple clients simultaneously):
python server.py
Add new games:
- Make a new file in the
games/
folder. - Define a class for your game, inheriting from
game_definition.GameDefinition
- Call
game_definition.register_game()
with your class as an argument to register your game. - Specify which game by either defining the
SECRET_TEAM_PICKER_GAME
environment variable or using the--game
command line option when runningserver.py
directly.
Run the tests:
python test.py
(or feel free to write some real ones)
Docs for libraries used:
TODO (remove once implemented):
- Add more games (ex. The Resistance)
- Automatic syncing (i.e push refreshes down to each player in the game)
- Allow "No Preference" option.