From be964567e6c23dd10437b81f772c4b3d601a7ce5 Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Tue, 18 Jan 2022 22:07:09 +0100 Subject: [PATCH] allow game 0 --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 6e06daa..45e86c9 100644 --- a/app.py +++ b/app.py @@ -39,7 +39,7 @@ def init_random_game(): @app.route('/init/deterministic', methods=['post']) def init_deterministic_game(): game_id = request.form.get('game_id') - if not game_id.isdigit() or not 0 < int(game_id) < NUM_GAMES: + if not game_id.isdigit() or not 0 <= int(game_id) < NUM_GAMES: flash("game_id must be between 0 and {}".format(NUM_GAMES)) return redirect(url_for('home')) return redirect(url_for('init_deterministic_game_id', game_id=game_id))