aboutsummaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/app.py b/app.py
index fac8a29..c4e4d89 100644
--- a/app.py
+++ b/app.py
@@ -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,