diff options
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -22,10 +22,20 @@ def home(): return render_template("index.j2") -@app.route("/new-games", methods=["POST"]) -def get_new_games(): +@app.route("/random-games", methods=["POST"]) +def get_random_games(): print("Creating new games...") - GAME_GENERATOR.create_games(COURT_LIST, PLAYER_LIST) + GAME_GENERATOR.create_random_games(COURT_LIST, PLAYER_LIST) + return render_template( + "games.j2", + games=GAME_GENERATOR.games, + ) + + +@app.route("/skilled-games", methods=["POST"]) +def get_skilled_games(): + print("Creating new games...") + GAME_GENERATOR.create_skilled_games(COURT_LIST, PLAYER_LIST) return render_template( "games.j2", games=GAME_GENERATOR.games, |
